/make-dir-range

Make directories from ranges of integers.

Primary LanguageJavaScriptMIT LicenseMIT

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