项目作者: loveqoo

项目描述 :
Diff objects using typescript
高级语言: TypeScript
项目地址: git://github.com/loveqoo/ts-diff.git
创建时间: 2020-11-14T16:33:12Z
项目社区:https://github.com/loveqoo/ts-diff

开源协议:

下载


ts-diff

Code Style: Google

Definition

A JavaScript function to compare two objects (or values).

This function returns information of fields with different values (and diff type).

Install

Install with npm:

  1. $ npm install --save ts-diff

How to use

  1. diff(1, 2) // MOD
  2. diff({a:1}, {a:2, b:1}) // a: MOD, b: NEW
  3. diff(1, undefined) // READY

Diff Types

  • NEW
  • MOD
  • DEL
  • READY