Skip to content

Commit 5c3ddf2

Browse files
author
Philipp Alferov
committed
Add childrenProperty to api docs
1 parent 305c2b2 commit 5c3ddf2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ var groupByParents = function(array, options) {
6060
* @param {Object} options An object containing the following fields:
6161
*
6262
* - `parentProperty` (String): A name of a property where a link to
63-
* a parent node could be found. Default: 'parent_id'
63+
* a parent node could be found. Default: 'parent_id'
6464
* - `customID` (String): An unique node identifier. Default: 'id'
65-
* - `childrenProperty` (String): A name of a property where chilren nodes
66-
* are going to be stored. Default: 'children'.
65+
* - `childrenProperty` (String): A name of a property where children nodes
66+
* are going to be stored. Default: 'children'.
6767
*
6868
* @return {Array} Result of transformation
6969
*/

readme.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ Convert a plain array of nodes (with pointers to parent nodes) to a a nested dat
101101

102102
- **Array** `data`: An array of data
103103
- **Object** `options`: An object containing the following fields:
104-
- `parentProperty` (String): A name of a property where a link to a parent node could be found. Default: 'parent_id'
105-
- `customID` (String): An unique node identifier. Default: 'id'
104+
- `parentProperty` (String): A name of a property where a link to a parent node could be found. Default: 'parent_id'.
105+
- `childrenProperty` (String): A name of a property where children nodes are going to be stored. Default: 'children'.
106+
- `customID` (String): An unique node identifier. Default: 'id'.
106107

107108
#### Return
108109

0 commit comments

Comments
 (0)