Skip to content

doc,assert: rename stackStartFunction #22077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ assert.fail(new TypeError('need array'));
Using `assert.fail()` with more than two arguments is possible but deprecated.
See below for further details.

## assert.fail(actual, expected[, message[, operator[, stackStartFunction]]])
## assert.fail(actual, expected[, message[, operator[, stackStartFn]]])
<!-- YAML
added: v0.1.21
changes:
Expand All @@ -600,7 +600,7 @@ changes:
* `expected` {any}
* `message` {string|Error}
* `operator` {string} **Default:** `'!='`
* `stackStartFunction` {Function} **Default:** `assert.fail`
* `stackStartFn` {Function} **Default:** `assert.fail`

> Stability: 0 - Deprecated: Use `assert.fail([message])` or other assert
> functions instead.
Expand All @@ -610,7 +610,7 @@ If `message` is falsy, the error message is set as the values of `actual` and
`expected` arguments are provided, `operator` will default to `'!='`. If
`message` is provided as third argument it will be used as the error message and
the other arguments will be stored as properties on the thrown object. If
`stackStartFunction` is provided, all stack frames above that function will be
`stackStartFn` is provided, all stack frames above that function will be
removed from stacktrace (see [`Error.captureStackTrace`]). If no arguments are
given, the default message `Failed` will be used.

Expand All @@ -636,7 +636,7 @@ assert.fail(1, 2, new TypeError('need array'));
In the last three cases `actual`, `expected`, and `operator` have no
influence on the error message.

Example use of `stackStartFunction` for truncating the exception's stacktrace:
Example use of `stackStartFn` for truncating the exception's stacktrace:

```js
function suppressFrame() {
Expand Down