Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nextui-org/shared-utils

Package Overview
Dependencies
Maintainers
1
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextui-org/shared-utils - npm Package Compare versions

Comparing version 0.0.0-dev-v2-20230624215649 to 0.0.0-dev-v2-20230625035223

dist/chunk-EB2I5ZVA.mjs

10

dist/functions.d.ts

@@ -16,3 +16,11 @@ type Args<T extends Function> = T extends (...args: infer R) => any ? R : never;

declare function getUniqueID(prefix: string): string;
/**
* This function removes all event handlers from an object.
*/
declare function removeEvents(input: {
[key: string]: any;
}): {
[key: string]: any;
};
export { callAll, callAllHandlers, capitalize, extractProperty, getUniqueID };
export { callAll, callAllHandlers, capitalize, extractProperty, getUniqueID, removeEvents };

@@ -27,3 +27,4 @@ "use strict";

extractProperty: () => extractProperty,
getUniqueID: () => getUniqueID
getUniqueID: () => getUniqueID,
removeEvents: () => removeEvents
});

@@ -61,2 +62,10 @@ module.exports = __toCommonJS(functions_exports);

}
function removeEvents(input) {
for (const key in input) {
if (key.startsWith("on")) {
delete input[key];
}
}
return input;
}
// Annotate the CommonJS export names for ESM import in node:

@@ -68,3 +77,4 @@ 0 && (module.exports = {

extractProperty,
getUniqueID
getUniqueID,
removeEvents
});

2

dist/index.d.ts

@@ -6,3 +6,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, getUniqueID } from './functions.js';
export { callAll, callAllHandlers, capitalize, extractProperty, getUniqueID, removeEvents } from './functions.js';
export { range } from './numbers.js';

@@ -9,0 +9,0 @@ export { warn } from './console.js';

@@ -49,2 +49,3 @@ "use strict";

range: () => range,
removeEvents: () => removeEvents,
renameProp: () => renameProp,

@@ -248,2 +249,10 @@ safeText: () => safeText,

}
function removeEvents(input) {
for (const key in input) {
if (key.startsWith("on")) {
delete input[key];
}
}
return input;
}

@@ -299,2 +308,3 @@ // src/numbers.ts

range,
removeEvents,
renameProp,

@@ -301,0 +311,0 @@ safeText,

{
"name": "@nextui-org/shared-utils",
"version": "0.0.0-dev-v2-20230624215649",
"version": "0.0.0-dev-v2-20230625035223",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc