1- 'use strict'
21const testValue = require ( 'test-value' )
32const where = testValue . where
43const arrayify = require ( 'array-back' )
@@ -86,11 +85,6 @@ function setID (doclet) {
8685 return doclet
8786}
8887
89- function setParentID ( doclet ) {
90- doclet . parentId = doclet . memberof
91- return doclet
92- }
93-
9488/**
9589run after setIsExportedFlag has processed using old name value
9690@depends setIsExportedFlag
@@ -123,7 +117,7 @@ function createConstructor (class_) {
123117
124118 const replacements = [ ]
125119 class_ = Object . assign ( { } , class_ )
126- const constructorProperties = [ 'description' , 'params' , 'examples' , 'returns' , 'exceptions' ]
120+ const constructorProperties = [ 'description' , 'params' , 'examples' , 'returns' , 'exceptions' ]
127121 const constructor = pick ( class_ , constructorProperties )
128122 for ( const prop of constructorProperties ) delete class_ [ prop ]
129123 if ( class_ . classdesc ) {
@@ -155,7 +149,7 @@ function insertConstructors (data) {
155149 } )
156150
157151 replacements . reverse ( ) . forEach ( function ( replacement ) {
158- var spliceArgs = [ replacement . index , 1 ] . concat ( replacement . items )
152+ var spliceArgs = [ replacement . index , 1 ] . concat ( replacement . items )
159153 data . splice . apply ( data , spliceArgs )
160154 } )
161155
@@ -167,12 +161,6 @@ hence the need for these four functions */
167161function getEs6Constructor ( data , parent ) {
168162 return data . find ( i => isES6Constructor ( i ) && i . memberof === parent . longname )
169163}
170- function isES5Class ( doclet ) {
171- return testValue ( doclet , {
172- kind : 'class' ,
173- meta : { code : { type : 'FunctionDeclaration' } }
174- } )
175- }
176164function isES6Class ( doclet ) {
177165 return testValue ( doclet , {
178166 kind : 'class' ,
@@ -258,7 +246,7 @@ function cleanProperties (doclet) {
258246}
259247
260248function wantedProperties ( input ) {
261- return omit ( input , [ 'comment' , 'meta' , 'undocumented' , '___id' , '___s' ] )
249+ return omit ( input , [ 'comment' , 'meta' , 'undocumented' , '___id' , '___s' ] )
262250}
263251
264252function buildTodoList ( doclet ) {
@@ -344,7 +332,7 @@ function sort (object, sortFunction) {
344332}
345333
346334function sortIdentifier ( doclet ) {
347- var fieldOrder = [ 'id' , 'parentId' , 'longname' , 'name' , 'kind' , 'scope' , 'isExported' , 'classdesc' , 'augments' , 'inherits' , 'inherited' , 'implements' , 'overrides' , 'mixes' , 'description' , 'memberof' , 'alias' , 'params' , 'fires' , 'examples' , 'returns' , 'type' , 'defaultvalue' , 'readonly' , 'thisvalue' , 'isEnum' , 'properties' , 'optional' , 'nullable' , 'variable' , 'author' , 'deprecated' , 'ignore' , 'access' , 'requires' , 'version' , 'since' , 'licenses' , 'license' , 'typicalname' , 'category' , 'see' , 'exceptions' , 'codeName' , 'todoList' , 'customTags' , 'chainable' , 'meta' , 'order' ]
335+ var fieldOrder = [ 'id' , 'parentId' , 'longname' , 'name' , 'kind' , 'scope' , 'isExported' , 'classdesc' , 'augments' , 'inherits' , 'inherited' , 'implements' , 'overrides' , 'mixes' , 'description' , 'memberof' , 'alias' , 'params' , 'fires' , 'examples' , 'returns' , 'type' , 'defaultvalue' , 'readonly' , 'thisvalue' , 'isEnum' , 'properties' , 'optional' , 'nullable' , 'variable' , 'author' , 'deprecated' , 'ignore' , 'access' , 'requires' , 'version' , 'since' , 'licenses' , 'license' , 'typicalname' , 'category' , 'see' , 'exceptions' , 'codeName' , 'todoList' , 'customTags' , 'chainable' , 'meta' , 'order' ]
348336 return sort ( doclet , function ( a , b ) {
349337 if ( fieldOrder . indexOf ( a ) === - 1 && fieldOrder . indexOf ( b ) > - 1 ) {
350338 return 1
@@ -385,7 +373,9 @@ function fixES6ConstructorMemberLongnames (data) {
385373 const es6constructor = getEs6Constructor ( data , i )
386374 if ( es6constructor ) {
387375 const constructorChildren = data . filter ( where ( { memberof : es6constructor . longname } ) )
388- constructorChildren . forEach ( child => child . memberof = i . longname )
376+ constructorChildren . forEach ( child => {
377+ child . memberof = i . longname
378+ } )
389379 }
390380 }
391381 } )
0 commit comments