@plurid/pipes.finder
TypeScript icon, indicating that this package has built-in type declarations

0.0.0-3 • Public • Published



License: DEL

plurid' pipes

Utility Pipes for Scripts

File Finder Pipe


Contents

Install

It is preferred to install the pipe globally

npm install -g @plurid/pipes.finder

and run the script with the global NODE_PATH

export NODE_PATH=$(npm root --quiet -g) && node path/to/script.js

Usage

// finder-script.js
const finder = require('@plurid/pipes.finder').default;


// all the files in the `process.cwd()` directory
const allFiles = finder();

// all the files except those containing `'node_modules'` in name
const filesExclude = finder({
    exclude: [
        'node_modules',
    ],
});

// all the files with the extension `'.ts'`, except those in `'node_modules'`
const tsFiles = finder({
    extension: '.ts', // accepts RegExp
    exclude: [
        'node_modules',
    ],
});

// all the files from the `'path/to/root'` directory
const rootedFiles = finder({
    root: 'path/to/root',
});

Packages

Version

@plurid/pipes.finder • files finder pipe

Version

@plurid/pipes.replacer • content replacer pipe

Codeophon

Readme

Keywords

Package Sidebar

Install

npm i @plurid/pipes.finder

Weekly Downloads

5

Version

0.0.0-3

License

SEE LICENSE IN LICENSE

Unpacked Size

19.9 kB

Total Files

11

Last publish

Collaborators

  • ly3xqhl8g9