doc: improve assert legacy text

This changes a sentence fragment into a full sentence and provides a few
other minor improvements.

PR-URL: https://github.com/nodejs/node/pull/19622
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Rich Trott authored and Beth Griggs committed 2018-12-04 11:51:12 +00:00
1 parent e48cc3c403
commit bf95392e86
1 file changed
+5 -7
+5 -7
View File
@@ -37,8 +37,8 @@ const assert = require('assert').strict;
> Stability: 0 - Deprecated: Use strict mode instead.
When accessing `assert` directly instead of using the `strict` property, the
[Abstract Equality Comparison][] will be used for any function without a
"strict" in its name (e.g. [`assert.deepEqual()`][]).
[Abstract Equality Comparison][] will be used for any function without "strict"
in its name, such as [`assert.deepEqual()`][].
It can be accessed using:
@@ -47,11 +47,9 @@ const assert = require('assert');
```
It is recommended to use the [`strict mode`][] instead as the
[Abstract Equality Comparison][] can often have surprising results. Especially
in case of [`assert.deepEqual()`][] as the used comparison rules there are very
lax.
E.g.
[Abstract Equality Comparison][] can often have surprising results. This is
especially true for [`assert.deepEqual()`][], where the comparison rules are
lax:
```js
// WARNING: This does not throw an AssertionError!