Skip to content

Commit 4385367

Browse files
Trottrvagg
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 479a43c commit 4385367

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');
@@ -355,7 +356,8 @@ util.isError(obj);
355356

356357
Stability: 0 - Deprecated
357358

358-
Returns `true` if the given "object" is a `Function`. `false` otherwise.
359+
Returns `true` if the given "object" is a `Function`. Otherwise, returns
360+
`false`.
359361

360362
```js
361363
const util = require('util');
@@ -375,7 +377,8 @@ util.isFunction(Bar)
375377

376378
Stability: 0 - Deprecated
377379

378-
Returns `true` if the given "object" is strictly `null`. `false` otherwise.
380+
Returns `true` if the given "object" is strictly `null`. Otherwise, returns
381+
`false`.
379382

380383
```js
381384
const util = require('util');
@@ -392,7 +395,8 @@ util.isNull(null)
392395

393396
Stability: 0 - Deprecated
394397

395-
Returns `true` if the given "object" is `null` or `undefined`. `false` otherwise.
398+
Returns `true` if the given "object" is `null` or `undefined`. Otherwise,
399+
returns `false`.
396400

397401
```js
398402
const util = require('util');
@@ -409,7 +413,7 @@ util.isNullOrUndefined(null)
409413

410414
Stability: 0 - Deprecated
411415

412-
Returns `true` if the given "object" is a `Number`. `false` otherwise.
416+
Returns `true` if the given "object" is a `Number`. Otherwise, returns `false`.
413417

414418
```js
415419
const util = require('util');
@@ -429,7 +433,7 @@ util.isNumber(NaN)
429433
Stability: 0 - Deprecated
430434

431435
Returns `true` if the given "object" is strictly an `Object` __and__ not a
432-
`Function`. `false` otherwise.
436+
`Function`. Otherwise, returns `false`.
433437

434438
```js
435439
const util = require('util');
@@ -448,7 +452,8 @@ util.isObject(function(){})
448452

449453
Stability: 0 - Deprecated
450454

451-
Returns `true` if the given "object" is a primitive type. `false` otherwise.
455+
Returns `true` if the given "object" is a primitive type. Otherwise, returns
456+
`false`.
452457

453458
```js
454459
const util = require('util');
@@ -477,7 +482,7 @@ util.isPrimitive(new Date())
477482

478483
Stability: 0 - Deprecated
479484

480-
Returns `true` if the given "object" is a `RegExp`. `false` otherwise.
485+
Returns `true` if the given "object" is a `RegExp`. Otherwise, returns `false`.
481486

482487
```js
483488
const util = require('util');
@@ -494,7 +499,7 @@ util.isRegExp({})
494499

495500
Stability: 0 - Deprecated
496501

497-
Returns `true` if the given "object" is a `String`. `false` otherwise.
502+
Returns `true` if the given "object" is a `String`. Otherwise, returns `false`.
498503

499504
```js
500505
const util = require('util');
@@ -513,7 +518,7 @@ util.isString(5)
513518

514519
Stability: 0 - Deprecated
515520

516-
Returns `true` if the given "object" is a `Symbol`. `false` otherwise.
521+
Returns `true` if the given "object" is a `Symbol`. Otherwise, returns `false`.
517522

518523
```js
519524
const util = require('util');
@@ -530,7 +535,7 @@ util.isSymbol(Symbol('foo'))
530535

531536
Stability: 0 - Deprecated
532537

533-
Returns `true` if the given "object" is `undefined`. `false` otherwise.
538+
Returns `true` if the given "object" is `undefined`. Otherwise, returns `false`.
534539

535540
```js
536541
const util = require('util');

0 commit comments

Comments
 (0)