Comparing version 1.3.0 to 1.4.0
import type { PriorityName } from './constants'; | ||
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; | ||
export type MergerSource = any[] | Record<string, any>; | ||
export type MergerSourceUnwrap<T extends MergerSource> = T extends Array<infer Return> ? Return : T; | ||
export type MergerResult<B extends MergerSource> = UnionToIntersection<MergerSourceUnwrap<B>>; | ||
export type Merger = <B extends MergerSource[]>(...sources: B) => MergerResult<B>; | ||
export type Options = { | ||
@@ -48,2 +44,10 @@ /** | ||
export type OptionsInput = Partial<Options>; | ||
export type MergerSource = any[] | Record<string, any>; | ||
export type MergerSourceUnwrap<T extends MergerSource> = T extends Array<infer Return> ? Return : T; | ||
export type MergerResult<B extends MergerSource> = UnionToIntersection<MergerSourceUnwrap<B>>; | ||
export type MergerContext = { | ||
options: Options; | ||
map: WeakMap<any, any>; | ||
}; | ||
export type Merger = <B extends MergerSource[]>(...sources: B) => MergerResult<B>; | ||
export {}; |
export declare function distinctArray<T = any>(arr: T[]): T[]; | ||
export declare function mergeArrays(...sources: any[][]): any[]; | ||
export declare function mergeArraysDistinct(...sources: any[][]): any[]; |
export declare function isObject(item: unknown): item is Record<string, any>; | ||
export declare function isSafeInput(object: any): boolean; | ||
export declare function isSafeKey(key: string): boolean; | ||
export declare function isEqual(x: any, y: any): boolean; |
@@ -0,1 +1,2 @@ | ||
export declare function polyfillClone<T>(input: T): T; | ||
export declare function clone<T>(value: T): T; |
@@ -5,3 +5,3 @@ export * from './array'; | ||
export * from './cut'; | ||
export * from './has-own-property'; | ||
export * from './object'; | ||
export * from './options'; |
{ | ||
"name": "smob", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Zero dependency library to safe merge objects.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80343
694