https://github.com/hideoo/lodash-doc-parser
Lodash documentation parser generating a JSON representation.
https://github.com/hideoo/lodash-doc-parser
documentation lodash node nodejs parser
Last synced: 7 months ago
JSON representation
Lodash documentation parser generating a JSON representation.
- Host: GitHub
- URL: https://github.com/hideoo/lodash-doc-parser
- Owner: HiDeoo
- License: mit
- Created: 2016-10-09T19:49:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T13:58:24.000Z (almost 9 years ago)
- Last Synced: 2025-07-04T20:40:36.905Z (7 months ago)
- Topics: documentation, lodash, node, nodejs, parser
- Language: JavaScript
- Size: 4.88 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lodash Doc Parser
[Node.js](https://nodejs.org) CLI tool fetching & parsing the latest [Lodash documentation](https://github.com/lodash/lodash/blob/master/doc/README.md) 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](https://github.com/HiDeoo/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`): 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`): 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](https://github.com/lodash/lodash/)
## Copyright and license
Copyright (c) 2016 HiDeoo. Code released under the [MIT license](LICENSE.md).