You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
source:yobrave > in main.js get
yobrave
in main.js set > other
in other.js, get
other
in other.js,set > yobrave
after other.js set ,in main.js get >
yobrave
Usage
// index.jsletstrict=false;constweoptions=require('weoptions')('id',strict);letoptions={name: 'yobrave',a: {b: {c: 1,},},// ...};letw=weoptions(options);// initw.set('a.b.c',2);//// 2w.set('a.b.e.d',2);//// 2// if strict == false, create e d, set d=2// if strict == true, create e d throw TypeErrorw.get();// options// orw.get('a.b.c');// 2// also you can, or nomodule.exports=w
// other.js// use the lib, no index.js exportsconstweoptions=require('weoptions')('id');// after initw.get();// optionsw.set('a.b.c',1);// 1w._setStrict(true);// change strict with id