https://github.com/noqcks/generated
Generated detects files that have been generated by computers
https://github.com/noqcks/generated
Last synced: about 2 months ago
JSON representation
Generated detects files that have been generated by computers
- Host: GitHub
- URL: https://github.com/noqcks/generated
- Owner: noqcks
- License: mit
- Created: 2018-11-28T16:01:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-16T19:24:58.000Z (3 months ago)
- Last Synced: 2025-04-20T09:39:20.498Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 7.59 MB
- Stars: 8
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Generated
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.ts](lib/generated.ts).
This project is largely a node.js port of the `generated` functionality of [GitHub linguist](https://github.com/github/linguist).
# Installation
```bash
pnpm add @noqcks/generated
```# Usage
See file [scripts/example.ts](scripts/example.ts) for an example of usage.
```typescript
import * as fs from "fs";
import * as path from "path";
import Generated from "@noqcks/generated";const name: string = "JavaScript/json2_backbone.js";
const filePath: string = path.join("./samples", name);
const contents = fs.readFileSync(filePath, "utf8");const g: Generated = new Generated(name, Buffer.from(contents));
console.log(g.isGenerated());
```# LICENSE
[MIT](LICENSE) © 2025 Benji Visser