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-20220819191103 to 0.0.0-dev-20220820120308

17

dist/index.cjs.js

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

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

@@ -52,2 +51,5 @@ warn: () => warn

}
var isFunction = (value) => typeof value === "function";
var dataAttr = (condition) => condition ? "" : void 0;
var ariaAttr = (condition) => condition ? true : void 0;
function callAllHandlers(...fns) {

@@ -61,14 +63,2 @@ return function func(event) {

}
var isFunction = (value) => typeof value === "function";
var dataAttr = (condition) => condition ? "" : void 0;
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) {

@@ -89,5 +79,4 @@ return function mergedFn(arg) {

isObject,
omit,
runIfFn,
warn
});

9

dist/index.d.ts

@@ -9,11 +9,10 @@ declare const cx: (...classNames: any[]) => string;

declare function runIfFn<T, U>(valueOrFn: T | ((...fnArgs: U[]) => T), ...args: U[]): T;
declare type FunctionArguments<T extends Function> = T extends (...args: infer R) => any ? R : never;
declare function callAllHandlers<T extends (event: any) => void>(...fns: (T | undefined)[]): (event: FunctionArguments<T>[0]) => void;
declare type Booleanish = boolean | "true" | "false";
declare const dataAttr: (condition: boolean | undefined) => Booleanish;
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 Args<T extends Function> = T extends (...args: infer R) => any ? R : never;
declare type AnyFunction<T = any> = (...args: T[]) => any;
declare function callAll<T extends AnyFunction>(...fns: (T | undefined)[]): (arg: FunctionArguments<T>[0]) => void;
declare function callAllHandlers<T extends (event: any) => void>(...fns: (T | undefined)[]): (event: Args<T>[0]) => void;
declare function callAll<T extends AnyFunction>(...fns: (T | undefined)[]): (arg: Args<T>[0]) => void;
export { ariaAttr, callAll, callAllHandlers, cx, dataAttr, isObject, omit, runIfFn, warn };
export { ariaAttr, callAll, callAllHandlers, cx, dataAttr, isObject, runIfFn, warn };

@@ -19,2 +19,5 @@ // src/index.ts

}
var isFunction = (value) => typeof value === "function";
var dataAttr = (condition) => condition ? "" : void 0;
var ariaAttr = (condition) => condition ? true : void 0;
function callAllHandlers(...fns) {

@@ -28,14 +31,2 @@ return function func(event) {

}
var isFunction = (value) => typeof value === "function";
var dataAttr = (condition) => condition ? "" : void 0;
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) {

@@ -55,5 +46,4 @@ return function mergedFn(arg) {

isObject,
omit,
runIfFn,
warn
};
{
"name": "@chakra-ui/shared-utils",
"version": "0.0.0-dev-20220819191103",
"version": "0.0.0-dev-20220820120308",
"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