@nextui-org/shared-utils
Advanced tools
Comparing version 0.0.0-dev-v2-20230405205125 to 0.0.0-dev-v2-20230407125356
@@ -15,3 +15,4 @@ type Args<T extends Function> = T extends (...args: infer R) => any ? R : never; | ||
declare function extractProperty<K extends keyof Extractable, D extends keyof Extractable>(key: K | string, defaultValue: D | string | boolean, ...objs: Extractable[]): string | boolean | D | Extractable[K]; | ||
declare function getUniqueID(prefix: string): string; | ||
export { callAll, callAllHandlers, capitalize, extractProperty }; | ||
export { callAll, callAllHandlers, capitalize, extractProperty, getUniqueID }; |
@@ -26,3 +26,4 @@ "use strict"; | ||
capitalize: () => capitalize, | ||
extractProperty: () => extractProperty | ||
extractProperty: () => extractProperty, | ||
getUniqueID: () => getUniqueID | ||
}); | ||
@@ -57,2 +58,5 @@ module.exports = __toCommonJS(functions_exports); | ||
} | ||
function getUniqueID(prefix) { | ||
return `${prefix}-${Math.floor(Math.random() * 1e6)}`; | ||
} | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -63,3 +67,4 @@ 0 && (module.exports = { | ||
capitalize, | ||
extractProperty | ||
extractProperty, | ||
getUniqueID | ||
}); |
@@ -9,3 +9,3 @@ export { Dict, __DEV__, __TEST__, dataAttr, isArray, isEmpty, isEmptyArray, isEmptyObject, isFunction, isNumeric, isObject } from './assertion.js'; | ||
export { getMargin } from './dimensions.js'; | ||
export { callAll, callAllHandlers, capitalize, extractProperty } from './functions.js'; | ||
export { callAll, callAllHandlers, capitalize, extractProperty, getUniqueID } from './functions.js'; | ||
export { CreateContextOptions, createContext } from './context.js'; | ||
@@ -12,0 +12,0 @@ export { range } from './numbers.js'; |
@@ -55,2 +55,3 @@ "use strict"; | ||
getProp: () => getProp, | ||
getUniqueID: () => getUniqueID, | ||
getValidChildren: () => getValidChildren, | ||
@@ -613,2 +614,5 @@ hexFromString: () => hexFromString, | ||
} | ||
function getUniqueID(prefix) { | ||
return `${prefix}-${Math.floor(Math.random() * 1e6)}`; | ||
} | ||
@@ -710,2 +714,3 @@ // src/context.ts | ||
getProp, | ||
getUniqueID, | ||
getValidChildren, | ||
@@ -712,0 +717,0 @@ hexFromString, |
{ | ||
"name": "@nextui-org/shared-utils", | ||
"version": "0.0.0-dev-v2-20230405205125", | ||
"version": "0.0.0-dev-v2-20230407125356", | ||
"description": "A set of NextUI utilities", | ||
@@ -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
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
92301
3227