Simple interface to
document.location.pathname
that returns/
in Node
$ npm install --save document-pathname
var pathname = require('document-pathname')
pathname()
//=> '/the/path' in a browser
//=> '/' in node
MIT © Ben Drucker
Simple interface to
document.location.pathname
that returns/
in Node
$ npm install --save document-pathname
var pathname = require('document-pathname')
pathname()
//=> '/the/path' in a browser
//=> '/' in node
MIT © Ben Drucker
npm i document-pathname
4
2.0.0
MIT