forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.js
More file actions
44 lines (29 loc) · 650 Bytes
/
Copy pathpublish.js
File metadata and controls
44 lines (29 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'use strict';
// MODULES //
var transform = require( './transform.js' );
// VARIABLES //
var opts = {
'undocumented': true
};
// MAIN //
/**
* Transforms an array of raw `doclet` objects and writes to `stdout`.
*
* @param {TAFFY} data - TAFFY database
*/
function publish( data ) {
var root;
var docs;
// Remove undocumented doclets:
data( opts ).remove();
// Retrieve an array of raw doclet objects:
docs = data().get();
// Transform the raw doclet array:
root = {};
transform( root, docs );
// Write to stdout:
console.log( JSON.stringify( root ) );
}
// EXPORTS //
module.exports = {};
module.exports.publish = publish;