add-subdirs

1.0.3 • Public • Published

add-subdirs

Adds sub-directories to a user defined top level directory. An array of the sub-directory paths is returned.

Install

npm install --save add-subdirs

Usage

const addSubdirs = require('add-subdirs');
const dirs = addSubdirs('/path/to/directory');

API

addSubdirs(dirpath[, num][, name])


dirpath (required)

Type: string

The directory path you want to add your sub-directories to.


num (optional)

Type: number

Default: 1

The number of subdirectories you want to add.


name (optional)

Type: string

Default: 'subdir'

The name of your sub-directories. An underscore character and a number

will be appended to the end of the name to make it unique.


License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    3
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i add-subdirs

Weekly Downloads

2

Version

1.0.3

License

MIT

Last publish

Collaborators

  • ryandavison