mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
17 lines
431 B
JavaScript
17 lines
431 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.
|
|
*
|
|
* @public
|
|
* @param {Object} data a file as an object with 'file' property
|
|
* @return {boolean} whether the file is json
|
|
*/
|
|
function filterJS(data) {
|
|
return !data.file.match(/\.json$/);
|
|
}
|
|
|
|
module.exports = filterJS;
|