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

@livechat/data-utils

Package Overview
Dependencies
Maintainers
9
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livechat/data-utils - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "@livechat/data-utils",
"version": "1.0.2",
"version": "1.0.3",
"description": "Collection of utility functions",

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

@@ -1,12 +0,1 @@

type ArrayElement<A> = A extends readonly (infer T)[] ? T : never;
type DeepWriteable<T> = {
-readonly [P in keyof T]: DeepWriteable<T[P]>;
};
type Cast<X, Y> = X extends Y ? X : Y;
type FromPairs<T> = T extends [infer Key, any][] ? {
[K in Cast<Key, PropertyKey>]: Extract<ArrayElement<T>, [K, any]>[1];
} : {
[key in string]: any;
};
type FromPairsWithReadOnly<T> = FromPairs<DeepWriteable<T>>;
/**

@@ -19,4 +8,5 @@ * returns an object constructed from the provided array of key, value pairs'

*/
export default function fromPairs<T extends ReadonlyArray<readonly [PropertyKey, any]>>(pairs: T): FromPairsWithReadOnly<T>;
export {};
export default function fromPairs<T extends ReadonlyArray<readonly [PropertyKey, any]>>(pairs: T): {
[K in T[number] as K[0]]: K[1];
};
//# sourceMappingURL=fromPairs.d.ts.map
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