Deep equal assertion with difference reporting.
npm install departure


Deep equal assertion with difference reporting.
| What | Where |
| --- | --- |
| Discussion | https://github.com/bigeasy/departure/issues/1 |
| Documentation | https://bigeasy.github.io/departure |
| Source | https://github.com/bigeasy/departure |
| Issues | https://github.com/bigeasy/departure/issues |
| CI | https://travis-ci.org/bigeasy/departure |
| Coverage: | https://codecov.io/gh/bigeasy/departure |
| License: | MIT |
Departure installs from NPM.
```
npm install departure
Extant is an implementation of SQL's COALESCE that I've used for some time to
deal with the fact that JavaScript truthiness will treat '' and 0 as true so||
the operator can't always be used to create given or default one-liner.
`javascript`
const { compare, raise, equal } = require('departure')
We use the name "extant" on NPM because we want the first extant argument.
This README.md is also a unit test using theokay
Proof unit test framework. We'll use the
Proof function to assert out statements in the readme. A Proof unit test
generally looks like this.
`javascript`
require('proof')(4, async okay => {
okay('always okay')
okay(true, 'okay if true')
okay(1, 1, 'okay if equal')
okay({ value: 1 }, { value: 1 }, 'okay if deep strict equal')
})
You can run this unit test yourself to see the output from the various
code sections of the readme.
`text`
git clone git@github.com:bigeasy/departure.git
cd departure
npm install --no-package-lock --no-save
node test/readme.t.js
The 'extant' module exports a single coalesce function.
`javascript`
const { compare, raise, equal } = require('depature')
Note that Extant is SQL's COALESCE. It returns the first non-null-like value,== null
that is the first value that is not , which would be null orundefined. If there is no such argument it returns null.
`javascript``
okay('test')