4.0.1 • Published 11 months ago

junk v4.0.1

Weekly downloads
2,040,750
License
MIT
Repository
github
Last release
11 months ago

junk

Filter out system junk files like .DS_Store and Thumbs.db

Install

$ npm install junk

Usage

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.

cpyimageminoxygenidegenerator-clint-backgenerator-clint-apicnn-image-utilityavroraossparrow-bird-servermonorepo-changelogunblock-block-save-variables@saaspe/components@everything-registry/sub-chunk-1994@armit/common@armit/file-utility@alibus/gov-open-builder@alibus/gov-open-checker@abtnode/cli@absolunet/fsp@absolunet/fssclinton@blacksmithstudio/blockbase@blackglory/electron-packager@bigbite/wp-cypress@blkmarketco/components-library@brickdoc/cpypwilkosz-nodejs.orgpspublisherracoon-lmpurgetssreact-form-component-libraryru-img-compressrx-bower-resolversequelcomponentxinix-paxvue-separate-webpack-plugintradetrust-configtrash-junkupaki-syncuptvuemaker-webpack-pluginwalktreewebpack-plugin-mockwenshuai-serveryemyaaswebframeswiktor12v_nodejszephir-gulp-workflowsvg-creatorsvgtovue-clisymplysvelte-component-libsvgbgsvg-sprite-creatortaman-baca-masyarakatsscomstacysparrow-serverrosidsassdownsassdown-vrecursive-copyrew12rm-upsindresorhus.jsspydread-package-namesreaddir-clean@cobalt-engine/cobower@coquardcyr/wp-cypress@cliqz-oss/chrome-webstore-upload-cli@iceworks/material-engine@iceworks/block-service@iceworks/utils@icedesign/iceworks-scaffoldercreate-from-blueprintcyfs@adonisjs/assembler@aligov/hanguang-disp-client@appworks/material-engine@antoine_a17/a17-node-sassdown@fzo/fzo-server@focusworkstemp/material-engine@hkjeffchan/imagemin@hubtools/media-store@ahun/imagemin@adobe/aio-cli-plugin-app@adminworks/material-enginedelete-empty-updependency-binderdesign-system-fitbank-450dir-to-evernote@electron/packager@elin/webpack-plugin-mock@eljs/release@cjsa/cpychewerchrome-webstore-upload-clicreate-raidtorrentcreate-torrent
4.0.1

11 months ago

4.0.0

3 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.1.0

7 years ago

2.0.0

8 years ago

1.0.3

8 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.0

11 years ago