make-dir-range

1.0.3 • Public • Published

make-dir-range

Build Status Current npm package version

Make directories from ranges of integers.

Installation

npm install --save make-dir-range

Usage

const makeDirRange = require('make-dir-range');
 
makeDirRange('1-3,5,9-10');
$ tree
.
├── 1
├── 2
├── 3
├── 5
├── 9
├── 10
│ ...

With options:

const makeDirRange = require('make-dir-range');
 
makeDirRange('11-13,15', {
    destination: 'out',
    append: 'a',
    prepend: 'p'
});
$ tree
.
├── out
│   ├── p11a
│   ├── p12a
│   ├── p13a
│   └── p15a
│ ...

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

Package Sidebar

Install

npm i make-dir-range

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

9.98 kB

Total Files

7

Last publish

Collaborators

  • austinleegordon