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

@dhmk/utils

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhmk/utils - npm Package Compare versions

Comparing version 4.2.1 to 4.2.2

2

esm/std.d.ts

@@ -12,3 +12,3 @@ import { StrKeyOf, DeepReadonly, DeepPartial } from "./types";

export declare function objectMap<T extends object>(src: T, mapValue: ValueMapper<T>, mapKey?: KeyMapper<T>): any;
export declare function objectTransform<T, K extends keyof any = keyof T, V = T[keyof T]>(src: T, mapEntry: (v: T[keyof T], k: keyof T, src: T) => readonly [K, V] | null): Record<K, V>;
export declare function objectTransform<T extends object, K extends keyof any = keyof T, V = T[keyof T]>(src: T, mapEntry: (v: T[keyof T], k: keyof T, src: T) => readonly [K, V] | null): Record<K, V>;
export declare function getter<T>(t: T, k: keyof T): Readonly<{

@@ -15,0 +15,0 @@ use<R>(value: R): R;

@@ -93,6 +93,5 @@ var __assign = (this && this.__assign) || function () {

return b;
var res = __assign({}, a);
var res = __assign(__assign({}, a), b); // copy symbols
for (var k in b) {
var v = b[k];
res[k] = mergeDeepRec(a[k], v);
res[k] = mergeDeepRec(a[k], b[k]);
}

@@ -99,0 +98,0 @@ return res;

@@ -14,3 +14,3 @@ export declare class Tag<T> {

export declare type Primitive = undefined | boolean | string | number | symbol | bigint;
export declare type NotPlainObject = Primitive | null | Function | Date | RegExp | ReadonlyArray<any> | ReadonlySet<any> | ReadonlyMap<any, any>;
export declare type NotPlainObject = Primitive | null | Function | Date | RegExp | Error | ReadonlyArray<any> | ReadonlySet<any> | ReadonlyMap<any, any>;
export declare type DeepReadonly<T> = T extends Primitive ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer T> ? ReadonlySet<DeepReadonly<T>> : {

@@ -17,0 +17,0 @@ readonly [P in keyof T]: DeepReadonly<T[P]>;

@@ -12,3 +12,3 @@ import { StrKeyOf, DeepReadonly, DeepPartial } from "./types";

export declare function objectMap<T extends object>(src: T, mapValue: ValueMapper<T>, mapKey?: KeyMapper<T>): any;
export declare function objectTransform<T, K extends keyof any = keyof T, V = T[keyof T]>(src: T, mapEntry: (v: T[keyof T], k: keyof T, src: T) => readonly [K, V] | null): Record<K, V>;
export declare function objectTransform<T extends object, K extends keyof any = keyof T, V = T[keyof T]>(src: T, mapEntry: (v: T[keyof T], k: keyof T, src: T) => readonly [K, V] | null): Record<K, V>;
export declare function getter<T>(t: T, k: keyof T): Readonly<{

@@ -15,0 +15,0 @@ use<R>(value: R): R;

@@ -110,6 +110,5 @@ "use strict";

return b;
var res = __assign({}, a);
var res = __assign(__assign({}, a), b); // copy symbols
for (var k in b) {
var v = b[k];
res[k] = mergeDeepRec(a[k], v);
res[k] = mergeDeepRec(a[k], b[k]);
}

@@ -116,0 +115,0 @@ return res;

@@ -14,3 +14,3 @@ export declare class Tag<T> {

export declare type Primitive = undefined | boolean | string | number | symbol | bigint;
export declare type NotPlainObject = Primitive | null | Function | Date | RegExp | ReadonlyArray<any> | ReadonlySet<any> | ReadonlyMap<any, any>;
export declare type NotPlainObject = Primitive | null | Function | Date | RegExp | Error | ReadonlyArray<any> | ReadonlySet<any> | ReadonlyMap<any, any>;
export declare type DeepReadonly<T> = T extends Primitive ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer T> ? ReadonlySet<DeepReadonly<T>> : {

@@ -17,0 +17,0 @@ readonly [P in keyof T]: DeepReadonly<T[P]>;

{
"name": "@dhmk/utils",
"version": "4.2.1",
"version": "4.2.2",
"description": "A collection of frequently used functions and primitives",

@@ -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