@naverpay/vanilla-store
Version:
  
23 lines (22 loc) • 423 B
JavaScript
function isSerializeValue(value) {
try {
JSON.stringify(value);
return true;
} catch (error) {
console.error(error);
return false;
}
}
class Persistent {
constructor(key, _value, typeAssertion) {
this.key = key;
this._value = _value;
this.typeAssertion = typeAssertion;
this._value = _value;
this.typeAssertion = typeAssertion;
}
}
export {
Persistent,
isSerializeValue
};