{"name":"junk","version":"0.2.1","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":"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.9.0"},"engines":{"node":">=0.8.0"},"licenses":[{"type":"MIT"}],"files":["junk.js"],"_id":"junk@0.2.1","dist":{"shasum":"e8a4c42c421746da34b354d0510507cb79f3c583","tarball":"http://registry-npm.ywwl.com/junk/download/junk-0.2.1.tgz","integrity":"sha512-+du8rLW0TYz2Cen+yyXdiS3F5WJBVpllOA1oozsXIrm1lwcKIGZLyXgyyYv/ErOgMjX9yay6U2ShtpMZ0K1yYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCM3zUAFuxNmwe2V+EJB0aQb65sb5DSFoLa5DHhbaU40QIhAJabaAZrMlrknDvi+UDChFkFQ769AqBAuoZe/bgyRFYM"}],"size":1305,"noattachment":false,"key":"/junk/-/junk-0.2.1.tgz"},"_from":".","_npmVersion":"1.2.18","_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":1367716557887,"_cnpm_publish_time":1367716557887,"dist-tags":{"latest":"4.0.1"}}