{"name":"junk","version":"0.2.2","description":"Helps you filter out OS junk files like .DS_Store and Thumbs.db","keywords":["junk","trash","garbage","files","os","operating system","ignore","exclude","filter"],"homepage":"https://github.com/sindresorhus/junk","bugs":{"url":"https://github.com/sindresorhus/junk/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"main":"junk.js","repository":{"type":"git","url":"git://github.com/sindresorhus/junk.git"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"~1.15.1"},"engines":{"node":">=0.8.0"},"licenses":[{"type":"MIT"}],"files":["junk.js"],"_id":"junk@0.2.2","dist":{"shasum":"d595eb199b37930cecd1f2c52820847e80e48ae7","tarball":"http://registry-npm.ywwl.com/junk/download/junk-0.2.2.tgz","integrity":"sha512-9tIwuEBLEIRBU2u+vd6pKOzEx8QE2MnzEuJxMLhMBfzMTXWDfuymZsDpRz1KgdMfpoqvdithy7X+tR0Bcc8CIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICfE0CaOjbn8kWD/Vv+987IBnIuyy1ZynSu5ZEmxpGlnAiEAzlYpMwhs/qh284wqmpnY/6nS2xx0afTJASbMp7fwlfA="}],"size":1353,"noattachment":false,"key":"/junk/-/junk-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"readme":"# junk\n\n> Filter out [system junk files](test.js) like `.DS_Store` and `Thumbs.db`\n\n## Install\n\n```\n$ npm install junk\n```\n\n## Usage\n\n```js\nimport fs from 'node:fs/promises';\nimport {isNotJunk} from 'junk';\n\nconst files = await fs.readdir('some/path');\n\nconsole.log(files);\n//=> ['.DS_Store', 'test.jpg']\n\nconsole.log(files.filter(isNotJunk));\n//=> ['test.jpg']\n```\n\n## API\n\n### isJunk(filename)\n\nReturns `true` if `filename` matches a junk file.\n\n### isNotJunk(filename)\n\nReturns `true` if `filename` does not match a junk file.\n\n### junkRegex\n\nRegex used for matching junk files.\n","publish_time":1386445740323,"_cnpm_publish_time":1386445740323,"dist-tags":{"latest":"4.0.1"}}