@chakra-ui/styled-system
Advanced tools
Comparing version 0.0.0-dev-20230528200306 to 0.0.0-dev-20230531082239
@@ -727,15 +727,11 @@ "use strict"; | ||
// src/get.ts | ||
var isSafeKey = (key) => key !== "__proto__" && key !== "prototype" && key !== "constructor"; | ||
var get = (obj, path, fallback) => { | ||
const keys2 = Array.isArray(path) ? path : path.split("."); | ||
for (let i = 0; i < keys2.length; i++) { | ||
const key = keys2[i]; | ||
if (!obj || !Object.prototype.hasOwnProperty.call(obj, key) || !isSafeKey(key)) { | ||
obj = void 0; | ||
function get(obj, path, fallback, index) { | ||
const key = typeof path === "string" ? path.split(".") : [path]; | ||
for (index = 0; index < key.length; index += 1) { | ||
if (!obj) | ||
break; | ||
} | ||
obj = obj[key]; | ||
obj = obj[key[index]]; | ||
} | ||
return obj != null ? obj : fallback; | ||
}; | ||
return obj === void 0 ? fallback : obj; | ||
} | ||
var memoize = (fn) => { | ||
@@ -742,0 +738,0 @@ const cache = /* @__PURE__ */ new WeakMap(); |
{ | ||
"name": "@chakra-ui/styled-system", | ||
"version": "0.0.0-dev-20230528200306", | ||
"version": "0.0.0-dev-20230531082239", | ||
"description": "Style function for css-in-js building component libraries", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
210672
6370