mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
21 lines
450 B
JavaScript
21 lines
450 B
JavaScript
'use strict';
|
|
|
|
var through = require('through');
|
|
|
|
/**
|
|
* 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 {stream.Transform}
|
|
*/
|
|
module.exports = function () {
|
|
return through(function (data) {
|
|
if (!data.file.match(/\.json$/)) {
|
|
this.push(data);
|
|
}
|
|
});
|
|
};
|