Skip to content
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

doc: copyedit util doc #5399

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
35 changes: 20 additions & 15 deletions doc/api/util.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ util.inspect(obj);

Internal alias for [`Array.isArray`][].

Returns `true` if the given "object" is an `Array`. `false` otherwise.
Returns `true` if the given "object" is an `Array`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -271,7 +271,7 @@ util.isArray({})

Stability: 0 - Deprecated

Returns `true` if the given "object" is a `Boolean`. `false` otherwise.
Returns `true` if the given "object" is a `Boolean`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -288,7 +288,7 @@ util.isBoolean(false)

Stability: 0 - Deprecated: Use [`Buffer.isBuffer()`][] instead.

Returns `true` if the given "object" is a `Buffer`. `false` otherwise.
Returns `true` if the given "object" is a `Buffer`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -305,7 +305,7 @@ util.isBuffer(new Buffer('hello world'))

Stability: 0 - Deprecated

Returns `true` if the given "object" is a `Date`. `false` otherwise.
Returns `true` if the given "object" is a `Date`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -322,7 +322,8 @@ util.isDate({})

Stability: 0 - Deprecated

Returns `true` if the given "object" is an [`Error`][]. `false` otherwise.
Returns `true` if the given "object" is an [`Error`][]. Otherwise, returns
`false`.

```js
const util = require('util');
Expand All @@ -339,7 +340,8 @@ util.isError({ name: 'Error', message: 'an error occurred' })

Stability: 0 - Deprecated

Returns `true` if the given "object" is a `Function`. `false` otherwise.
Returns `true` if the given "object" is a `Function`. Otherwise, returns
`false`.

```js
const util = require('util');
Expand All @@ -359,7 +361,8 @@ util.isFunction(Bar)

Stability: 0 - Deprecated

Returns `true` if the given "object" is strictly `null`. `false` otherwise.
Returns `true` if the given "object" is strictly `null`. Otherwise, returns
`false`.

```js
const util = require('util');
Expand All @@ -376,7 +379,8 @@ util.isNull(null)

Stability: 0 - Deprecated

Returns `true` if the given "object" is `null` or `undefined`. `false` otherwise.
Returns `true` if the given "object" is `null` or `undefined`. Otherwise,
returns `false`.

```js
const util = require('util');
Expand All @@ -393,7 +397,7 @@ util.isNullOrUndefined(null)

Stability: 0 - Deprecated

Returns `true` if the given "object" is a `Number`. `false` otherwise.
Returns `true` if the given "object" is a `Number`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -413,7 +417,7 @@ util.isNumber(NaN)
Stability: 0 - Deprecated

Returns `true` if the given "object" is strictly an `Object` __and__ not a
`Function`. `false` otherwise.
`Function`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -432,7 +436,8 @@ util.isObject(function(){})

Stability: 0 - Deprecated

Returns `true` if the given "object" is a primitive type. `false` otherwise.
Returns `true` if the given "object" is a primitive type. Otherwise, returns
`false`.

```js
const util = require('util');
Expand Down Expand Up @@ -461,7 +466,7 @@ util.isPrimitive(new Date())

Stability: 0 - Deprecated

Returns `true` if the given "object" is a `RegExp`. `false` otherwise.
Returns `true` if the given "object" is a `RegExp`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -478,7 +483,7 @@ util.isRegExp({})

Stability: 0 - Deprecated

Returns `true` if the given "object" is a `String`. `false` otherwise.
Returns `true` if the given "object" is a `String`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -497,7 +502,7 @@ util.isString(5)

Stability: 0 - Deprecated

Returns `true` if the given "object" is a `Symbol`. `false` otherwise.
Returns `true` if the given "object" is a `Symbol`. Otherwise, returns `false`.

```js
const util = require('util');
Expand All @@ -514,7 +519,7 @@ util.isSymbol(Symbol('foo'))

Stability: 0 - Deprecated

Returns `true` if the given "object" is `undefined`. `false` otherwise.
Returns `true` if the given "object" is `undefined`. Otherwise, returns `false`.

```js
const util = require('util');
Expand Down