This package has been deprecated

Author message:

Renamed to parent-directories

parent-dirs

3.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.

Package Sidebar

Install

npm i parent-dirs

Weekly Downloads

106

Version

3.0.0

License

MIT

Unpacked Size

2.58 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus