Adam Rensel b05888e79d Add the correct demo app | 9 년 전 | |
---|---|---|
.. | ||
index.js | 9 년 전 | |
package.json | 9 년 전 | |
readme.md | 9 년 전 |
Filter out OS junk files like
.DS_Store
andThumbs.db
$ npm install --save junk
var fs = require('fs');
var junk = require('junk');
fs.readdir('path', function (err, files) {
console.log(files);
//=> ['.DS_Store', 'test.jpg']
console.log(files.filter(junk.not));
//=> ['test.jpg']
});
Returns true if filename
matches a junk file.
Returns true if filename
doesn't match a junk file.
The regex used for matching.
MIT © Sindre Sorhus