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');
fbsPath.unescape('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'