Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pemrouz committed May 2, 2016
1 parent d173735 commit 047c057
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@
[![Coverage Status](https://coveralls.io/repos/rijs/data/badge.svg?branch=master&service=github)](https://coveralls.io/github/rijs/data?branch=master)
[![Build Status](https://travis-ci.org/rijs/data.svg)](https://travis-ci.org/rijs/data)

Allows registering data resources (objects or arrays).
Extends [core](https://github.com/rijs/core#ripple--core) to register objects and arrays. It also enables per-resource change listeners on those resources, as well versioning info.

```js
ripple('data', [])
```

All data resources will be emitterified:
All data resources will be [emitterified](https://github.com/utilise/utilise#--emitterify):

```js
ripple('data').on('change', fn)
ripple('data').once('change', fn)
ripple('data').emit('change')
// instead of: ripple.on('change', function(name, change){ .. })
ripple('name').on('change', function(change){ .. })
ripple('name').once('change', function(change){ .. })
ripple('name').emit('change')
```

All data resources will be initialised with [versioning info](https://github.com/utilise/utilise#--set):

```js
ripple('name').log
```

0 comments on commit 047c057

Please sign in to comment.