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

@chakra-ui/shared-utils

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/shared-utils - npm Package Compare versions

Comparing version 0.0.0-dev-20220819090547 to 0.0.0-dev-20220819092119

20

dist/index.cjs.js

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

ariaAttr: () => ariaAttr,
callAll: () => callAll,
callAllHandlers: () => callAllHandlers,

@@ -29,2 +30,3 @@ cx: () => cx,

isObject: () => isObject,
omit: () => omit,
runIfFn: () => runIfFn,

@@ -62,5 +64,22 @@ warn: () => warn

var ariaAttr = (condition) => condition ? true : void 0;
function omit(object, keys) {
const result = {};
Object.keys(object).forEach((key) => {
if (keys.includes(key))
return;
result[key] = object[key];
});
return result;
}
function callAll(...fns) {
return function mergedFn(arg) {
fns.forEach((fn) => {
fn == null ? void 0 : fn(arg);
});
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ariaAttr,
callAll,
callAllHandlers,

@@ -70,4 +89,5 @@ cx,

isObject,
omit,
runIfFn,
warn
});

5

dist/index.d.ts

@@ -14,3 +14,6 @@ declare const cx: (...classNames: any[]) => string;

declare const ariaAttr: (condition: boolean | undefined) => true | undefined;
declare function omit<T extends Record<string, any>, K extends keyof T>(object: T, keys: K[]): Omit<T, K>;
declare type AnyFunction<T = any> = (...args: T[]) => any;
declare function callAll<T extends AnyFunction>(...fns: (T | undefined)[]): (arg: FunctionArguments<T>[0]) => void;
export { ariaAttr, callAllHandlers, cx, dataAttr, isObject, runIfFn, warn };
export { ariaAttr, callAll, callAllHandlers, cx, dataAttr, isObject, omit, runIfFn, warn };

@@ -30,4 +30,21 @@ // src/index.ts

var ariaAttr = (condition) => condition ? true : void 0;
function omit(object, keys) {
const result = {};
Object.keys(object).forEach((key) => {
if (keys.includes(key))
return;
result[key] = object[key];
});
return result;
}
function callAll(...fns) {
return function mergedFn(arg) {
fns.forEach((fn) => {
fn == null ? void 0 : fn(arg);
});
};
}
export {
ariaAttr,
callAll,
callAllHandlers,

@@ -37,4 +54,5 @@ cx,

isObject,
omit,
runIfFn,
warn
};

2

package.json
{
"name": "@chakra-ui/shared-utils",
"version": "0.0.0-dev-20220819090547",
"version": "0.0.0-dev-20220819092119",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [

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