File: README.md

package info (click to toggle)
node-tap 12.0.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,996 kB
  • sloc: javascript: 13,674; sh: 75; makefile: 73
file content (26 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# tsame

Verify that two objects are the same, for use in
[tap](http://www.node-tap.org/).  The less accepting cousin of
[tmatch](http://npm.im/tmatch).

This merges code originally found in
[only-shallow](http://npm.im/only-shallow) and
[deeper](http://npm.im/deeper).  See license file for more details.

## USAGE

```javascript
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.