1.0.3 • Published 10 years ago

min-data v1.0.3

Weekly downloads
600
License
ISC
Repository
-
Last release
10 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

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago