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

smob

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smob - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

dist/utils/object.d.ts

12

dist/type.d.ts
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

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