File tree Expand file tree Collapse file tree 1 file changed +3
-43
lines changed
Expand file tree Collapse file tree 1 file changed +3
-43
lines changed Original file line number Diff line number Diff line change @@ -113,51 +113,11 @@ export const leftHandAssign = (target, source) =>
113113/**
114114 * Transforms an object to JSON output consistent with the JSON version.
115115 * @param {Object } section - The source object
116- * @param section.api
117- * @param section.type
118- * @param section.source
119- * @param section.introduced_in
120- * @param section.meta
121- * @param section.stability
122- * @param section.stabilityText
123- * @param section.classes
124- * @param section.methods
125- * @param section.properties
126- * @param section.miscs
127- * @param section.modules
128- * @param section.globals
129116 * @returns {string } - The JSON output
130117 */
131- export const legacyToJSON = ( {
132- api,
133- type,
134- source,
135- introduced_in,
136- meta,
137- stability,
138- stabilityText,
139- classes,
140- methods,
141- properties,
142- miscs,
143- modules,
144- globals,
145- } ) =>
118+ export const legacyToJSON = section =>
146119 JSON . stringify (
147- {
148- type,
149- source,
150- introduced_in,
151- meta,
152- stability,
153- stabilityText,
154- classes,
155- methods,
156- properties,
157- miscs,
158- modules,
159- globals,
160- } ,
120+ section ,
161121 [
162122 // TODO: remove this array once all the additional keys have been introduced downstream
163123 'added' ,
@@ -178,7 +138,7 @@ export const legacyToJSON = ({
178138 'meta' ,
179139 'methods' ,
180140 'miscs' ,
181- ...( api === 'index' ? [ ] : [ 'modules' ] ) ,
141+ ...( section . api === 'index' ? [ ] : [ 'modules' ] ) ,
182142 'name' ,
183143 'napiVersion' ,
184144 'options' ,
You can’t perform that action at this time.
0 commit comments