@yamada-ui/utils
Advanced tools
Comparing version 1.6.2-dev-20241214144625 to 1.6.2-dev-20241215203956
@@ -119,5 +119,4 @@ "use strict"; | ||
if (value.includes("px")) return parseFloat(value); | ||
const isBrowser = createdDom(); | ||
let fontSize = 16; | ||
if (isBrowser) { | ||
if (createdDom()) { | ||
const style = window.getComputedStyle(document.documentElement); | ||
@@ -124,0 +123,0 @@ const computedFontSize = parseFloat(style.fontSize); |
@@ -350,6 +350,8 @@ "use strict"; | ||
} | ||
function flattenObject(obj, { maxDepth, omitKeys, separator, shouldProcess } = {}) { | ||
maxDepth != null ? maxDepth : maxDepth = Infinity; | ||
omitKeys != null ? omitKeys : omitKeys = []; | ||
separator != null ? separator : separator = "."; | ||
function flattenObject(obj, { | ||
maxDepth = Infinity, | ||
omitKeys = [], | ||
separator = ".", | ||
shouldProcess | ||
} = {}) { | ||
if (!isObject(obj) && !isArray(obj) || !maxDepth) return obj; | ||
@@ -815,5 +817,4 @@ return Object.entries(obj).reduce((result, [key, value]) => { | ||
if (value.includes("px")) return parseFloat(value); | ||
const isBrowser = createdDom(); | ||
let fontSize = 16; | ||
if (isBrowser) { | ||
if (createdDom()) { | ||
const style = window.getComputedStyle(document.documentElement); | ||
@@ -820,0 +821,0 @@ const computedFontSize = parseFloat(style.fontSize); |
@@ -15,3 +15,3 @@ import { Dict } from './index.types.js'; | ||
} | ||
declare function flattenObject<Y extends Dict>(obj: any, { maxDepth, omitKeys, separator, shouldProcess }?: FlattenObjectOptions): Y; | ||
declare function flattenObject<Y extends Dict>(obj: any, { maxDepth, omitKeys, separator, shouldProcess, }?: FlattenObjectOptions): Y; | ||
declare function objectFromEntries<Y extends Dict>(entries: any[][]): Y; | ||
@@ -18,0 +18,0 @@ declare function keysFormObject<Y extends object>(obj: Y): (keyof Y)[]; |
@@ -138,6 +138,8 @@ "use strict"; | ||
} | ||
function flattenObject(obj, { maxDepth, omitKeys, separator, shouldProcess } = {}) { | ||
maxDepth != null ? maxDepth : maxDepth = Infinity; | ||
omitKeys != null ? omitKeys : omitKeys = []; | ||
separator != null ? separator : separator = "."; | ||
function flattenObject(obj, { | ||
maxDepth = Infinity, | ||
omitKeys = [], | ||
separator = ".", | ||
shouldProcess | ||
} = {}) { | ||
if (!isObject(obj) && !isArray(obj) || !maxDepth) return obj; | ||
@@ -144,0 +146,0 @@ return Object.entries(obj).reduce((result, [key, value]) => { |
{ | ||
"name": "@yamada-ui/utils", | ||
"version": "1.6.2-dev-20241214144625", | ||
"version": "1.6.2-dev-20241215203956", | ||
"description": "Yamada UI utils", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5592
429911