npm.io
0.0.5 • Published 10 years ago

dang

Licence
GPL-3.0
Version
0.0.5
Deps
2
Vulns
6
Weekly
0

Build Status Code Climate Test Coverage

Dang

Data driven events, expression evaluation and more.

Install

> npm install dang --save

Usage

var store = new Dang();

store.add({ name: 'm', value: 1 });
store.add({ name: 'c', value: 299792458 });
store.add('E', undefined, 'm*c*c');

store.get('E').on 'change:value', ->
    console.log 'E=mc2 is ', store.get('E').value()

API

Dang Store
dang.add(name, value, expression)

Add data instance to a Dang Store.

dang.get(name)

Get data instance by name from a Dang Store.

Dang Data
data.set(property, value)

Change a property, you can change everything but the value like this. (e.g.: expression, name)

data.get(property)

Get the value of a property.

data.evaluate()

Evaluate a Dang Data's expression.

How to develop

> npm install
> grunt

How to build (before publishing)

> npm install
> grunt build