# firebase-url

> Parse and format Firebase URLs

Latest version **1.0.1** (published 2015-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install firebase-url
pnpm add firebase-url
yarn add firebase-url
bun add firebase-url
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-06-18 |
| First published | 2015-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | firebase, url, parse, format |

## Links

- npm: https://www.npmjs.com/package/firebase-url
- Repository: https://github.com/bendrucker/firebase-url
- Homepage: https://github.com/bendrucker/firebase-url#readme
- Issues: https://github.com/bendrucker/firebase-url/issues
- npm.io page: https://npm.io/package/firebase-url

## Dependencies (1)

- [normalize-pathname](https://npm.io/package/normalize-pathname.md) ~1.0.1

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-06-18
- 1.0.0 — 2015-05-24

## README

# firebase-url [![Build Status](https://travis-ci.org/bendrucker/firebase-url.svg?branch=master)](https://travis-ci.org/bendrucker/firebase-url)

> Parse and format Firebase URLs


## Install

```
$ npm install --save firebase-url
```


## Usage

```js
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`) normalized `uri`

##### 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](http://bendrucker.me)

---
_Source: https://npm.io/package/firebase-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
