Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@chakra-ui/shared-utils
Advanced tools
@chakra-ui/shared-utils is a utility package that provides shared utility functions and constants used across various Chakra UI components. It helps in maintaining consistency and reducing code duplication within the Chakra UI library.
isFunction
The `isFunction` utility checks if a given value is a function. This is useful for type-checking and ensuring that certain operations are only performed on functions.
const { isFunction } = require('@chakra-ui/shared-utils');
console.log(isFunction(() => {})); // true
console.log(isFunction(123)); // false
isObject
The `isObject` utility checks if a given value is a plain object. This helps in validating inputs and ensuring that operations meant for objects are not mistakenly applied to other types.
const { isObject } = require('@chakra-ui/shared-utils');
console.log(isObject({})); // true
console.log(isObject(null)); // false
mergeWith
The `mergeWith` utility merges two objects deeply, combining their properties. This is useful for combining configuration objects or state objects in a predictable manner.
const { mergeWith } = require('@chakra-ui/shared-utils');
const obj1 = { a: 1, b: { c: 2 } };
const obj2 = { b: { d: 3 } };
const result = mergeWith(obj1, obj2);
console.log(result); // { a: 1, b: { c: 2, d: 3 } }
Lodash is a popular utility library that provides a wide range of functions for common programming tasks, such as manipulating arrays, objects, and functions. It offers more comprehensive functionality compared to @chakra-ui/shared-utils, but it is also larger in size.
Ramda is a functional programming library for JavaScript that emphasizes immutability and side-effect-free functions. It provides utilities for working with arrays, objects, and functions, similar to @chakra-ui/shared-utils, but with a focus on functional programming paradigms.
Underscore is a utility library that provides a range of functions for dealing with arrays, objects, and other data types. It is similar to Lodash but with a smaller footprint and fewer features. It offers some overlapping functionality with @chakra-ui/shared-utils.
A Quick description of the component
This is an internal utility, not intended for public usage.
yarn add @chakra-ui/shared-utils
# or
npm i @chakra-ui/shared-utils
Yes please! See the contributing guidelines for details.
This project is licensed under the terms of the MIT license.
FAQs
A Quick description of the component
The npm package @chakra-ui/shared-utils receives a total of 454,910 weekly downloads. As such, @chakra-ui/shared-utils popularity was classified as popular.
We found that @chakra-ui/shared-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.