# path-is-root

> Check if a path is root

Latest version **0.1.0** (published 2016-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install path-is-root
pnpm add path-is-root
yarn add path-is-root
bun add path-is-root
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-05-18 |
| First published | 2016-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Rocky Wu |
| Maintainers | rwu823 |
| Keywords | path, root, filesystem, file, system, fs |

## Links

- npm: https://www.npmjs.com/package/path-is-root
- Repository: https://github.com/rwu823/path-is-root
- Homepage: https://github.com/rwu823/path-is-root#readme
- Issues: https://github.com/rwu823/path-is-root/issues
- npm.io page: https://npm.io/package/path-is-root

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-05-18

## README

[![Build Status](https://img.shields.io/travis/rwu823/path-is-root.svg?branch=master)](https://travis-ci.org/rwu823/path-is-root) [![Coverage](https://img.shields.io/coveralls/rwu823/path-is-root.svg)](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

---
_Source: https://npm.io/package/path-is-root · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
