firebasepath
v1.0.3
Published
"os.path" equivalent for Firebase users
Downloads
1
Maintainers
Readme
Features
- No dependency!
- Subdomain name support e.g. "a.goodexample.com"
- Hyphenated domain name support e.g. "good-example.com"
Install
$ node install --save firebasepath
Usage
var fbsPath = require('firebasepath');
fbsPath.escape('example.com'); // -> example-com
fbsPath.unescape('example-com'); // -> example.com
Test
$ node test
Domain Name Firebase Path
escaped: 'token-mail.io' -> 'token-mail-io'
escaped: 'codeandpush.com' -> 'codeandpush-com'
escaped: 'stance.com.ng' -> 'stance-com-ng'
unescaped: 'token-mail.io' <- 'token--mail-io'
unescaped: 'codeandpush.com' <- 'codeandpush-com'
unescaped: 'stance.com.ng' <- 'stance-com-ng'