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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.1
    71,179
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.1
    71,179
  • 2.0.0
    830
  • 1.1.2
    7,609
  • 1.1.1
    22
  • 1.1.0
    20
  • 1.0.0
    18

Package Sidebar

Install

npm i tsame

Weekly Downloads

34,358

Version

2.0.1

License

ISC

Unpacked Size

7.65 kB

Total Files

4

Last publish

Collaborators

  • isaacs