November: Procrastination Month
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

tsame

2.0.1 • Public • Published

tsame

Verify that two objects are the same, for use in tap. The less accepting cousin of tmatch.

This merges code originally found in only-shallow and deeper. See license file for more details.

USAGE

const tsame = require('tsame')
 
const obj1 = { foo: '1' }
const obj2 = { foo: 1 }
 
// nonstrict by default
assert(tsame(obj1, obj2))
 
// strictly the same, types and all
assert(!tsame.strict(obj1, obj2))

Pretty much what it says on the tin.

Keywords

none

install

npm i tsame

Downloadsweekly downloads

39,115

version

2.0.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability