Skip to content

HiDeoo/lodash-doc-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Lodash Doc Parser

Node.js CLI tool fetching & parsing the latest Lodash documentation in order to generate a JSON representation.

The generated JSON will only contains Lodash methods.

This tool was originally created to create a JSON representation of the Lodash documentation for the autocomplete-lodash Atom package.

Installation

Clone the repository and install the dependencies:

npm install

Usage

Use the following command:

npm run start

The JSON representation will be saved in a lodash.json file.

Configuration

The configuration is made directly in the index.js file using 2 variables located at the top of the file:

  • kDocUrl (string): Lodash documentation URL.
  • kBlacklistedMethods (Array<string>): List of blacklisted Lodash methods to exclude from the JSON representation.

Format

The JSON representation generated is an array of objects. Each object represents a Lodash method and contains the following properties:

  • name (string): Name of the Lodash method.
  • description (string): Description of the Lodash method.
  • args (Array<string>): List of the method arguments. If the method takes no argument, the array will be empty.
  • returns (string): Returns value of the Lodash method.
  • url (string): Direct URL to the Lodash method documentation.
[
  {
    "name": "chunk",
    "description": "Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.",
    "args": [
      "array",
      "[size=1]"
    ],
    "returns": "(Array)",
    "url": "https://lodash.com/docs/4.16.4#chunk"
  },
  ...
]

Credits

Lodash

Copyright and license

Copyright (c) 2016 HiDeoo. Code released under the MIT license.

About

Lodash documentation parser generating a JSON representation.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published