@-0/browser
Advanced tools
Comparing version 0.3.39 to 0.3.40
@@ -5,14 +5,13 @@ import { Atom } from "@thi.ng/atom"; | ||
export const $store$ = new Atom(API.$$_DEFAULT); | ||
const DETOUR_KEY = "home"; | ||
const home_spread_err = ` | ||
You've attempted to swap a non-Object payload into store | ||
You've attempted to set a non-Object payload to the store | ||
at the root path. This would overwrite any other values | ||
in the store (which is an object). So, we've taken the | ||
liberty of preserving both by placing your payload under | ||
a '${DETOUR_KEY}' key at the root. | ||
the '${API.DETOUR}' key at the root. | ||
If you need to place something at the root of the state, | ||
If you need to place something at the root of the store, | ||
please consider packaging this payload as an Object to | ||
enable it to be merged with the root Object and prevent | ||
this annoyance in the future. | ||
enable it to be merged (using { ...store, ...yours }) with | ||
the root Object and prevent this annoyance in the future. | ||
`; | ||
@@ -26,3 +25,3 @@ export const set$$tate = (path = [], val = {}, store = $store$) => { | ||
console.warn(home_spread_err); | ||
return Object.assign(Object.assign({}, x), { [DETOUR_KEY]: val }); | ||
return Object.assign(Object.assign({}, x), { [API.DETOUR]: val }); | ||
} | ||
@@ -29,0 +28,0 @@ return val; |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.3.39", | ||
"version": "0.3.40", | ||
"description": "Browser helpers for -0 state management, routing and the interaction between", | ||
@@ -35,5 +35,5 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@-0/keys": "^0.3.43", | ||
"@-0/utils": "^0.3.44", | ||
"@-0/spool": "^0.3.34", | ||
"@-0/keys": "^0.3.44", | ||
"@-0/utils": "^0.3.45", | ||
"@-0/spool": "^0.3.35", | ||
"@thi.ng/paths": "^4.2.13", | ||
@@ -52,5 +52,5 @@ "@thi.ng/rstream": "^6.0.20" | ||
"@types/jest": "^27.0.1", | ||
"@types/node": "^16.7.4", | ||
"@typescript-eslint/eslint-plugin": "^4.29.3", | ||
"@typescript-eslint/parser": "^4.29.3", | ||
"@types/node": "^16.7.10", | ||
"@typescript-eslint/eslint-plugin": "^4.30.0", | ||
"@typescript-eslint/parser": "^4.30.0", | ||
"babel-jest": "^27.1.0", | ||
@@ -57,0 +57,0 @@ "cross-env": "^7.0.3", |
46009
554
+ Added@thi.ng/arrays@2.10.17(transitive)
+ Added@thi.ng/checks@3.7.0(transitive)
+ Added@thi.ng/dcons@3.2.144(transitive)
+ Added@thi.ng/paths@5.2.3(transitive)
+ Added@thi.ng/transducers@9.2.20(transitive)
- Removed@thi.ng/arrays@2.10.18(transitive)
- Removed@thi.ng/checks@3.7.1(transitive)
- Removed@thi.ng/dcons@3.2.145(transitive)
- Removed@thi.ng/paths@5.2.4(transitive)
- Removed@thi.ng/transducers@9.2.21(transitive)
Updated@-0/keys@^0.3.44
Updated@-0/spool@^0.3.35
Updated@-0/utils@^0.3.45