Whether or not a given path is relative
npm install is-relative-path> Sometimes I just want to scream
npm install is-relative-path
#### isRelative(path)
- path
- Returns:
``js
var isRelative = require('is-relative-path');
isRelative('../'); // true
isRelative('/'); // false
`
#### Code
| Version | Code |
| ------- | -----------------------------------|
| 1.x | (path) => path[0] === '.' |(path) => !path.isAbsolute(path)
| 2.x | |
#### Test
| path | v1.x | v2.x |
| --------- | -------- | -------- |
| "" | false | true |"."
| | true | true |".."
| | true | true |"foo"
| | false | true |"/foo"` | false | false |
|