dreamstate
Version:
Store management library based on react context and observers
1 lines • 433 B
JavaScript
import{DreamstateError as r}from"../core/error/DreamstateError.js";import{NestedStore as e}from"../core/storing/NestedStore.js";import{EDreamstateErrorCode as t}from"../types/error.js";import{isObject as o}from"./typechecking.js";function i(i){if(o(i))return Object.assign(new e,i);throw new r(t.INCORRECT_PARAMETER,"Nested stores should be initialized with an object, got '".concat(typeof i,"' instead."))}export{i as createNested};