# ember-bp-cpv

> Create validatable buffered proxies with ease.

Latest version **1.0.4** (published 2017-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-bp-cpv
pnpm add ember-bp-cpv
yarn add ember-bp-cpv
bun add ember-bp-cpv
```

## 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.4 |
| Published | 2017-05-01 |
| First published | 2017-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | stefan@kuibul.ro |
| Maintainers | shuriu |
| Keywords | ember-addon, ember-buffered-proxy, ember-cp-validations |

## Links

- npm: https://www.npmjs.com/package/ember-bp-cpv
- Repository: https://github.com/shuriu/ember-bp-cpv
- Homepage: https://github.com/shuriu/ember-bp-cpv#readme
- Issues: https://github.com/shuriu/ember-bp-cpv/issues
- npm.io page: https://npm.io/package/ember-bp-cpv

## Dependencies (2)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^6.1.0
- [ember-buffered-proxy](https://npm.io/package/ember-buffered-proxy.md) ^0.7.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2017-05-01
- 1.0.3 — 2017-04-25
- 1.0.2 — 2017-04-24
- 1.0.0 — 2017-04-24

## README

# ember-bp-cpv

[![Build Status](https://travis-ci.org/shuriu/ember-bp-cpv.svg?branch=master)](https://travis-ci.org/shuriu/ember-bp-cpv)
[![npm version](https://badge.fury.io/js/ember-bp-cpv.svg)](https://badge.fury.io/js/ember-bp-cpv)
[![Ember Observer Score](https://emberobserver.com/badges/ember-bp-cpv.svg)](https://emberobserver.com/addons/ember-bp-cpv)

`ember-bp-cpv` is a small wrapper around [`ember-buffered-proxy`](https://github.com/yapplabs/ember-buffered-proxy) that reduces the boilerplate of creating a validated buffer.

## Why?

Because most of the time, you don't want to change the underlying model directly. Also because you don't want so much boilerplate.

  `ember install ember-bp-cpv`

## Usage

The intended usage is with [`ember-cp-validations`](https://github.com/offirgolan/ember-cp-validations) (not included in this addon):

```js
import Ember from 'ember';
import createBuffer from 'ember-bp-cpv';
import { validator, buildValidations } from 'ember-cp-validations';

const Validations = buildValidations({
  email: {
    validators: [
      validator('presence', true)
    ]
  }
});

export default Ember.Controller.extend({
  buffer: createBuffer('model', Validations)
});
```

Now in you have access to a validated `buffer` that you can use wherever you please.

You can also use the buffer without validations:

```js
import Ember from 'ember';
import createBuffer from 'ember-bp-cpv';

export default Ember.Controller.extend({
  buffer: createBuffer('model')
});
```

## Contributing

**Any contribution**, be it an issue, a feature or a bugfix is greatly appreciated :heart:

Also, if your feature or bugfix is tested, I will give you commit rights.

## Credits / Inspiration

* [`ember-validated-form-buffer`](https://github.com/simplabs/ember-validated-form-buffer)
* [`ember-buffered-proxy`](https://github.com/yapplabs/ember-buffered-proxy)
* [`ember-cp-validations`](https://github.com/offirgolan/ember-cp-validations)

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