UNPKG

@qvant/qui-max

Version:

A Vue 3 Design system for Web.

16 lines (15 loc) 575 B
import isArray from "./isArray.js"; import isSymbol from "./isSymbol.js"; var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); } export { isKey as default }; //# sourceMappingURL=_isKey.js.map