@cjser/junk
v4.0.1-cjser.2
Published
Filter out system junk files like .DS_Store and Thumbs.db
Maintainers
Readme
junk
Filter out system junk files like
.DS_StoreandThumbs.db
Install
$ npm install junkUsage
import fs from 'node:fs/promises';
import {isNotJunk} from 'junk';
const files = await fs.readdir('some/path');
console.log(files);
//=> ['.DS_Store', 'test.jpg']
console.log(files.filter(isNotJunk));
//=> ['test.jpg']API
isJunk(filename)
Returns true if filename matches a junk file.
isNotJunk(filename)
Returns true if filename does not match a junk file.
junkRegex
Regex used for matching junk files.
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/junk
