New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/object-utils

Package Overview
Dependencies
Maintainers
3
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.0-dev-20221223180742 to 0.0.0-dev-20230102093714

7

dist/index.d.ts
declare function compact<T extends Record<any, any>>(object: T): {} & T;
declare function omit<T extends Record<any, any>, K extends keyof T>(object: T, keysToOmit?: K[]): Omit<T, K>;
declare function pick<T extends Record<any, any>, K extends keyof T>(object: T, keysToPick: K[]): { [P in K]: T[P]; };
declare function omit<T extends Record<string, any>, K extends keyof T>(object: T, keysToOmit?: K[]): Omit<T, K>;
declare function pick<T extends Record<string, any>, K extends keyof T>(object: T, keysToPick: K[]): { [P in K]: T[P]; };
declare function split<T extends Record<string, any>, K extends keyof T>(object: T, keys: K[]): [{ [P in K]: T[P]; }, Omit<T, K>];
declare function assignAfter(target: Record<string, any>, ...sources: any[]): Record<string, unknown>;
export { compact, omit, pick, split };
export { assignAfter, compact, omit, pick, split };

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

__export(src_exports, {
assignAfter: () => assignAfter,
compact: () => compact,

@@ -41,4 +42,5 @@ omit: () => omit,

for (const key of keysToOmit) {
if (key in clone)
if (key in clone) {
delete clone[key];
}
}

@@ -67,4 +69,23 @@ return clone;

}
function assignAfter(target, ...sources) {
if (target == null) {
throw new TypeError("Cannot convert undefined or null to object");
}
const result = { ...target };
for (const nextSource of sources) {
if (nextSource == null)
continue;
for (const nextKey in nextSource) {
if (!Object.prototype.hasOwnProperty.call(nextSource, nextKey))
continue;
if (nextKey in result)
delete result[nextKey];
result[nextKey] = nextSource[nextKey];
}
}
return result;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
assignAfter,
compact,

@@ -71,0 +92,0 @@ omit,

{
"name": "@chakra-ui/object-utils",
"version": "0.0.0-dev-20221223180742",
"version": "0.0.0-dev-20230102093714",
"description": "",

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

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