Skip to content

michaelrhodes/unwrap-dir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unwrap-dir

unwrap-dir removes top-level wrapping directories.

Build status

install

$ npm install unwrap-dir

example

It’s often the case that you extract an archive and find its contents wrapped in a single directory. unwrap-dir can be used to rectify this annoyance.

some-folder
└─┬ wrapping-folder
  ├── one
  ├── two
  └── three
var unwrap = require('unwrap-dir')

unwrap('./some-folder', function (err, unwrapped) {
  console.log(unwrapped)
  > true
})
some-folder
├── one
├── two
└── three

license

MIT

About

remove top-level wrapping directories

Resources

Stars

Watchers

Forks

Packages

No packages published