extra utilities for path
module of nodejs
var path = require('node-path-extras');
console.log(path.contains('/a', '/a/b')); // true
opposite to path.contains
var path = require('node-path-extras');
console.log(path.within('/a/b', '/a')); // true
alias path.inpath
var path = require('node-path-extras');
console.log(path.along('/a/b/c', '/a/b', '/a/b/c/d')); // true
var path = require('node-path-extras');
console.log(path.isRelative('../a')); // true
console.log(path.isRelative('/a')); // false
var path = require('node-path-extras');
console.log(path.isAbsolute('../a')); // false
console.log(path.isAbsolute('/a')); // true
// for windows
console.log(path.isAbsolute('c:\a')); // true
remove paths in the same route in an array
var path = require('node-path-extras');
console.log(path.unique(['/a/b', '/a', '/c'])); // ['/a', '/c']
MIT