Generated detects files that have been automatically generated

Usage no npm install needed!

<script type="module">
  import noqcksGenerated from 'https://cdn.skypack.dev/@noqcks/generated';



Build Status

Not all files are written by humans. Generated will detect files that have been generated by computers. Items like a package-lock.json or files in node_modules.

For a full list of generated files detected, see generated.js.

This project is largely a node.js port of the generated functionality of GitHub linguist.


See file scripts/example.js for an example of usage.

var fs = require('fs');
var path = require('path');

const generated = require("./lib/generated");

var name = "JavaScript/json2_backbone.js"

filePath = path.join("./samples", name);

try {
  var contents = fs.readFileSync(filePath, 'utf8');
} catch (e) {
  if (e.code !== 'ENOENT') throw err;
  var contents = ''

g = new generated(name, contents)



MIT © 2021 Benji Visser benji@093b.org