File manager - Edit - /usr/local/lib/node_modules/ghost-cli/node_modules/path-is-root/README.md
Back
[](https://travis-ci.org/rwu823/path-is-root) [](https://coveralls.io/github/rwu823/path-is-root) # path-is-root check if a path is root ## Install ```javascript npm install --save path-is-root ``` ## Usage ```javascript import isRoot from 'path-is-root' test('should be root path in Unix', assert => { assert.is(isRoot('/'), true) }) test('should be not root path in Unix', assert => { assert.is(isRoot('/x'), false) }) test('should be root path in Win', assert => { assert.is(isRoot('C:/'), true) }) test('should be not root path in Win', assert => { assert.is(isRoot('C:/x'), false) }) ``` ## API ### isRoot(path) Returns a boolean of whether the path is root
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings