@solid-primitives/i18n
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -8,3 +8,3 @@ import { createContext, createSignal, useContext, DEV } from 'solid-js'; | ||
function deepReadObject(obj, path, defaultValue) { | ||
const value = path.trim().split(".").reduce((a, b) => a ? a[b] : void 0, obj); | ||
const value = obj[path] || path.trim().split(".").reduce((a, b) => a ? a[b] : void 0, obj); | ||
return value !== void 0 ? value : defaultValue; | ||
@@ -11,0 +11,0 @@ } |
{ | ||
"name": "@solid-primitives/i18n", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Primitive to create and use i18n primitives.", | ||
@@ -55,8 +55,12 @@ "author": "Alexandre Mouton-Brady <amoutonbrady@gmail.com>", | ||
}, | ||
"devDependencies": { | ||
"solid-js": "1.7.9" | ||
}, | ||
"scripts": { | ||
"dev": "jiti ../../scripts/dev.ts", | ||
"build": "jiti ../../scripts/build.ts", | ||
"test": "vitest -c ../../configs/vitest.config.ts", | ||
"test:ssr": "pnpm run test --mode ssr" | ||
"vitest": "vitest -c ../../configs/vitest.config.ts", | ||
"test": "pnpm run vitest", | ||
"test:ssr": "pnpm run vitest --mode ssr" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
33844
8
527
1