npm

Need private packages and team management tools?Check out npm Orgs. »

copy-to-range

1.0.3 • Public • Published

copy-to-range

Build Status Current npm package version

Copy a file to a range of directories.

Installation

npm install --save copy-to-range

Usage

const copyToRange = require('copy-to-range');
 
copyToRange('file.txt', '1-4');
$ tree
.
├── file.txt
├── 1
│   └── file.txt
├── 2
│   └── file.txt
├── 3
│   └── file.txt
├── 4
│   └── file.txt
│ ...

With options:

const copyToRange = require('copy-to-range');
 
copyToRange('file.txt', '11-13,20', {
    destination: 'out',
    append: 'a',
    prepend: 'p'
});
$ tree
.
├── file.txt
├── out
│   ├── p11a
│   │   └── file.txt
│   ├── p12a
│   │   └── file.txt
│   ├── p13a
│   │   └── file.txt
│   └── p20a
│       └── file.txt
│ ...

Options

Property Description Default
destination Destination directory ""
append String to append to directory names ""
prepend String to prepend to directory names ""

Related

Authors

  • Austin Gordon - Development - GitHub

License

This project is licensed under the MIT License - see the LICENSE file for details

install

npm i copy-to-range

Downloadsweekly downloads

5

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability