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.
Clone the repository and install the dependencies:
npm install
Use the following command:
npm run start
The JSON representation will be saved in a lodash.json file.
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.
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"
},
...
]
Copyright (c) 2016 HiDeoo. Code released under the MIT license.