1.0.3 • Published 9 years ago

min-data v1.0.3

Weekly downloads
600
License
ISC
Repository
-
Last release
9 years ago

min-data

Build status NPM version Downloads Dependency Status

Store value for object, jQuery style Data

Installation

npm i min-data

Usage

var Data = require('min-data')

var data = new Data
var obj = {}

data.set(obj, 'foo', 'bar')
data.get(obj, 'foo') // => 'bar'
data.remove(obj, 'foo')

Why should use Data

We use jQuery style Data rather than obj.foo = 'bar'

Because we can avoid object Circular Reference

Then we can JSON.stringify(obj) safely

Simple clear all data by data.remove(obj)

License

License

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago