From 047c05774792891c57bcccf0859967745539a79f Mon Sep 17 00:00:00 2001 From: pemrouz Date: Mon, 2 May 2016 01:48:16 +0100 Subject: [PATCH] docs: update readme --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c3ea693..497b730 100644 --- a/README.md +++ b/README.md @@ -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 ``` \ No newline at end of file