npm.io
0.0.2 • Published 8 years ago

assert-strict

Licence
MIT
Version
0.0.2
Deps
0
Size
1 kB
Vulns
0
Weekly
0

node assert is deprecated in favour of assert.strict, but commonjs-assert doesn't support strict mode. Get the strictest assert possible today!

instead of:

import assertModule from 'assert';

const assert = assertModule.strict || assertModule;

in every test just do this:

npm install --save-dev 'assert-strict'
import assert from 'assert-strict';

The contents of this module are as follows:

module.exports=function(a){return a.strict||a}(require('assert'));

Keywords