build data stuck like a stone, Sturdy!
npm install @axetroy/stone
import Stone from '@axetroy/stone';
const userInfo = new Stone({username:'axetroy'});
// back
userInfo.username = 'admin'; // it will throw an error.
// good
userInfo.set('username', 'admin'); // this is ok.
console.log(userInfo.username); // print "admin"
set a value.
remove a key
subscribe the stone change
watch specify key change, base on .subscribe
return the keys list you set
return the values list you set
- stringify():string
convert to string, base on JSON.stringify()
git clone https://github.com/axetroy/stone.git
cd ./stone
yarn
yarn run dev
The MIT License