# firebase-bolt-validation

> Type validation library for firebase modules

Latest version **0.0.3** (published 2016-11-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install firebase-bolt-validation
pnpm add firebase-bolt-validation
yarn add firebase-bolt-validation
bun add firebase-bolt-validation
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-11-11 |
| First published | 2016-05-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jason Turner |
| Maintainers | brewsoftware |
| Keywords | firebase, bolt, validation |

## Links

- npm: https://www.npmjs.com/package/firebase-bolt-validation
- Repository: https://www.github.com/brewsoftware/firebase-bolt-validation
- npm.io page: https://npm.io/package/firebase-bolt-validation

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2016-11-11
- 0.0.2 — 2016-05-26
- 0.0.1 — 2016-05-25

## README

# firebase-bolt-validation

Commonly used firebase type validation rules.

# Dependent Project

  - [Gulp Firebase Bolt](https://www.github.com/brewsoftware/gulp-firebase-bolt) - Bolt compiler with module import support.
  - [Validator](https://github.com/chriso/validator.js) - Validation rules stripped for common regular expressions.
  - [Firebase Bolt](https://www.github.com/firebase/bolt) - Bolt Parser implementation.
  - [Firebase Bolt - Monkey Patch](https://www.github.com/brewsoftware/bolt) - Monkey path to test the new compiler syntax with this plugin.
  - [Firebase Security and Modeling Language](https://www.github.com/firebase/bolt/docs/language.md) - Language documentation and syntax
  

# Using the gulp plugin

Firstly you will need the modified gulp compiler as the root firebase compiler doesn't support import statments yet.

    $ npm install gulp-firebase-bold

Secondly just install this module like any npm package

    $ npm install firebase-bolt-validation

and finally make sure you include a reference to the specific module in your file. This only needs to be included once as a global import

    $ import {'firebase-bolt-validation'}
    path /uuid is UUID {
      read() {true}
      write() {auth != null}
    }

which should give the following in your JSON.

     "uuid": {
      ".validate": "newData.isString() && newData.val().matches(/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i)",
      ".read": "true"
    }

an example usage for validating 

Enjoy. As always comments and suggestions are welcome. I have pulled what I can from the npm "validator" javascript plugin and will look at pulling in some more use cases soon.

Jason Turner
BrewSoftware

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