Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const obj = deserialize(Obj, {
x: 0
})
const d = autorun(() => {
updatedByAutorun = obj.x
})
expect(isObservableProp(obj, "x")).toBe(true)
expect(updatedByAutorun).toEqual(0)
obj.x++
expect(obj.x).toEqual(1)
expect(updatedByAutorun).toEqual(1)
expect(serialize(obj).x).toEqual(1)
d()
})
save () {
const jsProfileList = [];
for (const profile of this.profiles.map.values()) {
jsProfileList.push(serialize(profile));
}
localStorage.setItem('profileList', JSON.stringify(jsProfileList));
console.log('Saved');
}
autorun(() => {
const deserializedTutorialState = serialize(tutorialState);
localStorage.setItem(sessionId, JSON.stringify(deserializedTutorialState));
});
() => serialize(schema, store),
(data: any) => storage.setItem(key, !jsonify ? data : JSON.stringify(data)),
serialize: function serialize$$1() {
var schema = getDefaultModelSchema(this.constructor);
return serialize(schema, this);
},
update: function update$$1(json, callback) {
public get serializedQuery() {
return qs.stringify(serialize(this))
}
serialize() {
const schema = getDefaultModelSchema(this.constructor);
return serialize(schema, this);
},
update(json, callback) {
mobx_1.reaction(function () { return serializr_1.serialize(schema, store); }, function (data) { return storage.setItem(key, !jsonify ? data : JSON.stringify(data)); }, {
delay: debounce