7.23.0 • Published 2 years ago

@noqcks/generated v7.23.0

Weekly downloads
117
License
MIT
Repository
-
Last release
2 years ago

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. The versioning of this project will follow the versioning of linguist.

Usage

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 = ''
}

const g = new Generated(name, contents)

console.log(g.is_generated())

LICENSE

MIT © 2022 Benji Visser benji@093b.org

7.23.0

2 years ago

1.0.1

3 years ago

1.0.0

5 years ago

0.1.5

5 years ago