Parse ignore files (.gitignore and .npmignore)
npm install file-ignore-parserParse ignore files (.gitignore and .npmignore)
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
``bash`
$ npm i file-ignore-parseror
$ yarn add file-ignore-parser
js
const parser = require("file-ignore-parser");parser(".gitignore").then(console.log).catch(console.error);
``> If you want an Array you can convert the Set with Array.from()