Socket
Socket
Sign inDemoInstall

timm

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timm - npm Package Compare versions

Comparing version 1.7.0 to 1.7.1

.github/workflows/run-tests.yml

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 1.7.1 (2020-9-16)
* Improve TypeScript signatures (fix overload order + add missing catch-alls).
## 1.7.0 (2020-8-27)

@@ -2,0 +6,0 @@

6

lib/timm.d.ts

@@ -27,8 +27,9 @@ declare type Key = string | number;

export declare function merge<T extends object>(a: T): T;
export declare function merge<T extends object>(a: T, b: undefined | null): T;
export declare function merge<T extends object, U extends object>(a: T, b: U): Omit<T, keyof U> & U;
export declare function merge<T extends object>(a: T, b: undefined | null): T;
export declare function merge<T extends object, U extends object, V extends object>(a: T, b: U, c: V): Omit<Omit<T, keyof U> & U, keyof V> & V;
export declare function merge<T extends object, V extends object>(a: T, b: undefined | null, c: V): Omit<T, keyof V> & V;
export declare function merge<T extends object, U extends object>(a: T, b: U, c: undefined | null): Omit<T, keyof U> & U;
export declare function merge<T extends object>(a: T, b: undefined | null, c: undefined | null): T;
export declare function merge<T extends object, U extends object, V extends object>(a: T, b: U, c: V): Omit<Omit<T, keyof U> & U, keyof V> & V;
export declare function merge(a: object, ...rest: Array<object | null>): object;
export declare function mergeDeep(a: object, b?: object | null, c?: object | null, d?: object | null, e?: object | null, f?: object | null, ...rest: Array<object | null>): object;

@@ -40,2 +41,3 @@ export declare function mergeIn(a: any, path: Key[], b?: object | null, c?: object | null, d?: object | null, e?: object | null, f?: object | null, ...rest: Array<object | null>): unknown;

export declare function addDefaults<T extends object, U extends object>(a: T, b: U): Omit<U, keyof T> & T;
export declare function addDefaults(a: object, b: object, ...rest: Array<object | null>): object;
declare const timm: {

@@ -42,0 +44,0 @@ clone: typeof clone;

@@ -458,3 +458,3 @@ "use strict";

// Implementation and catch-all
// Implementation
function merge(a, b, c, d, e, f, ...rest) {

@@ -461,0 +461,0 @@ return rest.length ? doMerge.call(null, false, false, a, b, c, d, e, f, ...rest) : doMerge(false, false, a, b, c, d, e, f);

{
"name": "timm",
"version": "1.7.0",
"version": "1.7.1",
"description": "Immutability helpers with fast reads and acceptable writes",

@@ -28,3 +28,2 @@ "author": "Guillermo Grau Panea",

"build": "yarn lint && yarn compile && yarn test && yarn docs && yarn xxl",
"travis": "yarn test",
"xxl": "xxl",

@@ -36,9 +35,9 @@ "benchmarks": "node tools/benchmarks",

"devDependencies": {
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.4",
"@babel/preset-env": "^7.11.0",
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"@babel/preset-typescript": "^7.10.1",
"@typescript-eslint/eslint-plugin": "^3.10.1",
"@typescript-eslint/parser": "^3.10.1",
"eslint": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.11.0",

@@ -49,3 +48,2 @@ "oao": "^2.0.0",

"chalk": "1.1.3",
"coveralls": "^3.1.0",
"extract-docs": "^1.6.1",

@@ -56,3 +54,3 @@ "immutability-helper": "^2.8.1",

"lodash": "^4.17.20",
"prettier": "^2.1.1",
"prettier": "^2.1.2",
"seamless-immutable": "^7.1.4",

@@ -59,0 +57,0 @@ "xxl": "^1.3.0"

@@ -1,2 +0,2 @@

# timm [![Build Status](https://travis-ci.org/guigrpa/timm.svg)](https://travis-ci.org/guigrpa/timm) [![Coverage Status](https://coveralls.io/repos/github/guigrpa/timm/badge.svg?branch=master)](https://coveralls.io/github/guigrpa/timm?branch=master) [![npm version](https://img.shields.io/npm/v/timm.svg)](https://www.npmjs.com/package/timm)
# timm [![Build Status](https://github.com/guigrpa/timm/workflows/Tests/badge.svg)](https://github.com/guigrpa/timm/actions) [![npm version](https://img.shields.io/npm/v/timm.svg)](https://www.npmjs.com/package/timm)

@@ -3,0 +3,0 @@ Immutability helpers with fast reads and acceptable writes ([blog post](http://guigrpa.github.io/2016/06/16/painless-immutability/))

@@ -476,2 +476,3 @@ /* eslint-disable @typescript-eslint/ban-types */

// - 2 args
export function merge<T extends object>(a: T, b: undefined | null): T;
export function merge<T extends object, U extends object>(

@@ -481,9 +482,3 @@ a: T,

): Omit<T, keyof U> & U;
export function merge<T extends object>(a: T, b: undefined | null): T;
// - 3 args
export function merge<T extends object, U extends object, V extends object>(
a: T,
b: U,
c: V
): Omit<Omit<T, keyof U> & U, keyof V> & V;
export function merge<T extends object, V extends object>(

@@ -504,3 +499,11 @@ a: T,

): T;
// Implementation and catch-all
export function merge<T extends object, U extends object, V extends object>(
a: T,
b: U,
c: V
): Omit<Omit<T, keyof U> & U, keyof V> & V;
// - X args
export function merge(a: object, ...rest: Array<object | null>): object;
// Implementation
export function merge(

@@ -514,3 +517,3 @@ a: object,

...rest: Array<object | null>
): unknown {
): object {
return rest.length

@@ -679,2 +682,9 @@ ? doMerge.call(null, false, false, a, b, c, d, e, f, ...rest)

): Omit<U, keyof T> & T;
// - X args
export function addDefaults(
a: object,
b: object,
...rest: Array<object | null>
): object;
// Implementation and catch-all

@@ -689,3 +699,3 @@ export function addDefaults(

...rest: Array<object | null>
): unknown {
): object {
return rest.length

@@ -692,0 +702,0 @@ ? doMerge.call(null, true, false, a, b, c, d, e, f, ...rest)

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