documentation/streams/filter_js.js
Tom MacWright 56bdd39066 Sketch out a less streamy documentationjs
cc @jfirebaugh - I think you mentioned earlier that streams don't
make sense for some of the documentationjs internals. I agree - I think
something like this direction would let us cut a lot of complexity.
Thoughts?
2015-09-26 12:34:55 -04:00

15 lines
339 B
JavaScript

'use strict';
/**
* Node & browserify support requiring JSON files. JSON files can't be documented
* with JSDoc or parsed with espree, so we filter them out before
* they reach documentation's machinery.
*
* @name access
* @public
* @return {boolean}
*/
module.exports = function (data) {
return !data.file.match(/\.json$/);
};