tantamount

Is equal utility

BSD 8 个版本
安装
npm install tantamount
yarn add tantamount
pnpm add tantamount
bun add tantamount
README

Tantamount Build Status

This Node module is a port to CoffeeScript of the old isEqual implementation from underscore that was removed in this commit.

It is basically the same as underscore's current isEqual function except that it uses either value's isEqual function when available.

Installing

npm install tantamount

Using

isEqual = require 'tantamount'

isEqual(a, b)

Tests if a is equal to b.

a - A value to test.

b - A value to test.

Returns true if the two objects are equal, false otherwise.

Using with Jasmine

You can use this library as your Jasmine equality tester by doing:

jasmine.getEnv().addEqualityTester(require('tantamount'))

Using with Underscore

You can use this library to replace the default _.isEqual by doing:

require('underscore').isEqual = require('tantamount')
版本列表
0.8.0 2013-11-21
0.7.0 2013-11-19
0.6.0 2013-10-15
0.5.0 2013-09-26
0.4.0 2013-08-29
0.3.0 2013-07-06
0.2.0 2013-07-04
0.1.0 2013-07-03