From ad2036fc1a7114bdb961d176fcabca4e0a7b92f5 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 19 Jun 2019 22:05:44 -0600 Subject: doc: revise assert legacy mode text Revise the text for the `assert` module's legacy mode to make it simpler and more scannable. PR-URL: https://github.com/nodejs/node/pull/28315 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Trivikram Kamat --- doc/api/assert.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'doc/api/assert.md') diff --git a/doc/api/assert.md b/doc/api/assert.md index e611dfbe1b..822e05aa1c 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -121,18 +121,21 @@ Please note that this will also deactivate the colors in the REPL. > 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 "strict" -in its name, such as [`assert.deepEqual()`][]. +Legacy mode uses the [Abstract Equality Comparison][] in: -It can be accessed using: +* [`assert.deepEqual()`][] +* [`assert.equal()`][] +* [`assert.notDeepEqual()`][] +* [`assert.notEqual()`][] + +To use legacy mode: ```js const assert = require('assert'); ``` -It is recommended to use the [`strict` mode][] instead as the -[Abstract Equality Comparison][] can often have surprising results. This is +Whenever possible, use the [`strict` mode][] instead. Otherwise, the +[Abstract Equality Comparison][] may cause surprising results. This is especially true for [`assert.deepEqual()`][], where the comparison rules are lax: -- cgit v1.2.3