Wondering what’s next for npm?Check out our public roadmap! »

    parent-dirs

    2.0.0 • Public • Published

    parent-dirs

    Get an array of parent directories including itself

    Install

    $ npm install parent-dirs
    

    Usage

    import parentDirectories from 'parent-dirs';
    
    parentDirectories();
    /*
    [
    	'/Users/sindresorhus/dev/parent-dirs',
    	'/Users/sindresorhus/dev',
    	'/Users/sindresorhus',
    	'/Users',
    	'/'
    ]
    */

    API

    parentDirectories(cwd)

    cwd

    Type: string
    Default: process.cwd()

    Directory starting point to return paths from.

    Install

    npm i parent-dirs

    DownloadsWeekly Downloads

    1,123

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    2.58 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar