{"name":"fast-ignore","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/fast-ignore.git"},"description":"A fast parser and processor for .gitignore files.","version":"1.1.2","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"benchmark":"tsex benchmark","benchmark:watch":"tsex benchmark --watch","benchmark:prepare":"cd tasks && git clone https://github.com/babel/babel.git","clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["fast","gitignore","dotignore","ignore"],"dependencies":{"grammex":"^3.1.2"},"devDependencies":{"benchloop":"^2.1.1","fava":"^0.3.1","tsex":"^3.0.1","typescript":"^5.3.3"},"_id":"fast-ignore@1.1.2","gitHead":"772ddbf2fc33e5d76386c90e0181639d6b386efe","bugs":{"url":"https://github.com/fabiospampinato/fast-ignore/issues"},"homepage":"https://github.com/fabiospampinato/fast-ignore#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-7eHBVK0jd28rmNUDQrYxkFxGUfFSPRUQf2ZrB63mrTnaerHKfOoS26r4sedKYw8LIKo+fFltzknX5R0PKRbtGg==","shasum":"d7a5acfcf7f5c7f40fafad68f8b5c9530ba79ff6","tarball":"http://registry-npm.ywwl.com/fast-ignore/download/fast-ignore-1.1.2.tgz","fileCount":34,"unpackedSize":34665,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+y4hOqj+tbcC88C7VZyEPZkMEF8hqfuL6dpBC9PIjvgIhALVSKKeLUVVWEkHLPxtcjUdZVY8Y9kbLZKBR3+OdSubC"}],"size":8635,"noattachment":false,"key":"/fast-ignore/-/fast-ignore-1.1.2.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-ignore_1.1.2_1711658768542_0.4180855639753598"},"_hasShrinkwrap":false,"readme":"# Fast Ignore\n\nA fast parser and processor for `.gitignore` files.\n\nNote: terminal slashes on globs are ignored for now.\n\n## Install\n\n```sh\nnpm install --save fast-ignore\n```\n\n## Usage\n\n```ts\nimport fastIgnore from 'fast-ignore';\n\n// Let's create the content of a .gitignore file\n\nconst gitignore = `\n# Some always-ignore files\n*~\n*.err\n*.log\n._*\n.cache\n.fseventsd\n.DocumentRevisions*\n.DS_Store\n.TemporaryItems\n.Trashes\nThumbs.db\n\n# Some project-specific ignores\ndist\nnode_modules\n`;\n\n// Let's create our ignore function\n\nconst ignore = fastIgnore ( gitignore );\n\n// Now we can check if a relative path should be ignored\n\nignore ( 'foo/bar.js' ); // false\nignore ( 'node_modules/foo/bar.js' ); // true\nignore ( 'dist/foo/bar.js' ); // true\n\n// We can also work with multiple ignore files at once, which is faster than handling them individually\n// This goes roughly as fast as just concatenating the files together, but with the semantics of separate files\n// The difference is that an ignore file that comes later won't be able to un-ignore something that was ignored by a previous one\n// As a result please note that writing `fastIgnore ([ 'dist', '!dist' ])` may work differently than you expected\n\nconst prettierignore = `\n**/test\n**/__test__\n\n# The following globs are effectively useless\n# because they can't un-ignore something that was ignored by any previous ignore files\n!dist\n!node_modules\n`;\n\nconst comboIgnore = fastIgnore ([ gitignore, prettierignore ]);\n\ncomboIgnore ( 'foo/bar.js' ); // false\ncomboIgnore ( 'node_modules/foo/bar.js' ); // true\ncomboIgnore ( 'dist/foo/bar.js' ); // true\ncomboIgnore ( 'test/foo/bar.js' ); // true\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1711658768778,"_cnpm_publish_time":1711658768778,"dist-tags":{"latest":"2.0.0"}}