join-path-js
v0.0.0
Published
Simple path join and dirname functions for generic javascript
Downloads
7,752
Readme
join-path
Simple path join and dirname functions for generic javascript, a small package of this gist, big thank to @creationix.
Why
Nodejs have buildin some great url manipulation, but native javascript don't. Use this package with browserify
, to make url manipulation in frontend possible.
Install
npm install join-path-js
Sample
var assert = require('assert');
var join = require('join-path');
it("should join the path", function() {
assert.equal('/test/wow/this/is/awesome', join('/test/', './wow/this/is/awesome'))
})
License
MIT