Skip to content

Commit ee17a8f

Browse files
TrottMyles Borins
authored andcommitted
doc: copyedit util doc
Add verbs to make sentence fragments less fragmentary. PR-URL: #5399 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent 5a618e3 commit ee17a8f

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

doc/api/util.markdown

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ util.inspect(obj);
254254

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

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

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

272272
Stability: 0 - Deprecated
273273

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

276276
```js
277277
const util = require('util');
@@ -288,7 +288,7 @@ util.isBoolean(false)
288288

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

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

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

306306
Stability: 0 - Deprecated
307307

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

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

323323
Stability: 0 - Deprecated
324324

325-
Returns `true` if the given "object" is an [`Error`][]. `false` otherwise.
325+
Returns `true` if the given "object" is an [`Error`][]. Otherwise, returns
326+
`false`.
326327

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

340341
Stability: 0 - Deprecated
341342

342-
Returns `true` if the given "object" is a `Function`. `false` otherwise.
343+
Returns `true` if the given "object" is a `Function`. Otherwise, returns
344+
`false`.
343345

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

360362
Stability: 0 - Deprecated
361363

362-
Returns `true` if the given "object" is strictly `null`. `false` otherwise.
364+
Returns `true` if the given "object" is strictly `null`. Otherwise, returns
365+
`false`.
363366

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

377380
Stability: 0 - Deprecated
378381

379-
Returns `true` if the given "object" is `null` or `undefined`. `false` otherwise.
382+
Returns `true` if the given "object" is `null` or `undefined`. Otherwise,
383+
returns `false`.
380384

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

394398
Stability: 0 - Deprecated
395399

396-
Returns `true` if the given "object" is a `Number`. `false` otherwise.
400+
Returns `true` if the given "object" is a `Number`. Otherwise, returns `false`.
397401

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

415419
Returns `true` if the given "object" is strictly an `Object` __and__ not a
416-
`Function`. `false` otherwise.
420+
`Function`. Otherwise, returns `false`.
417421

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

433437
Stability: 0 - Deprecated
434438

435-
Returns `true` if the given "object" is a primitive type. `false` otherwise.
439+
Returns `true` if the given "object" is a primitive type. Otherwise, returns
440+
`false`.
436441

437442
```js
438443
const util = require('util');
@@ -461,7 +466,7 @@ util.isPrimitive(new Date())
461466

462467
Stability: 0 - Deprecated
463468

464-
Returns `true` if the given "object" is a `RegExp`. `false` otherwise.
469+
Returns `true` if the given "object" is a `RegExp`. Otherwise, returns `false`.
465470

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

479484
Stability: 0 - Deprecated
480485

481-
Returns `true` if the given "object" is a `String`. `false` otherwise.
486+
Returns `true` if the given "object" is a `String`. Otherwise, returns `false`.
482487

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

498503
Stability: 0 - Deprecated
499504

500-
Returns `true` if the given "object" is a `Symbol`. `false` otherwise.
505+
Returns `true` if the given "object" is a `Symbol`. Otherwise, returns `false`.
501506

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

515520
Stability: 0 - Deprecated
516521

517-
Returns `true` if the given "object" is `undefined`. `false` otherwise.
522+
Returns `true` if the given "object" is `undefined`. Otherwise, returns `false`.
518523

519524
```js
520525
const util = require('util');

0 commit comments

Comments
 (0)