documentation/lib/filter_js.js
Tom MacWright c24a9b88a4 Enable jsdoc rule and enforce it.
Also:

* Moves reduction out of parsers so that they don't have awkward
  function signatures
2015-09-28 20:36:07 -04:00

16 lines
429 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
* @param {Object} data a file as an object with 'file' property
* @return {boolean} whether the file is json
*/
module.exports = function (data) {
return !data.file.match(/\.json$/);
};