Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@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 409,971 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.