1.0.1 • Published 10 years ago
firebase-url v1.0.1
firebase-url 
Parse and format Firebase URLs
Install
$ npm install --save firebase-urlUsage
var firebaseUrl = require('firebase-url')
// inverses
firebaseUrl.parse('https://your-endpoint.firebaseio.com/foo/bar')
firebaseUrl.format({
endpoint: 'https://your-endpoint.firebaseio.com',
path: '/foo/bar'
})API
parse(uri) -> uriObject
Parses a URL, returning a parsed URL object with the properties:
endpoint(string)path(string)isRoot(boolean)uri(string) normalizeduri
uri
Required
Type: string
A Firebase URL, either an endpoint alone or an endpoint plus a path.
format(urlObject) -> string
uriObject
Required
Type: object
Formats a uriObject back into a uri string. The uriObject must have endpoint and path properties. All others are ignored.
License
MIT © Ben Drucker