Browse Source

util: made util.isArray a direct alias for Array.isArray

v0.11.13-release
Evan Carroll 11 years ago
committed by Fedor Indutny
parent
commit
95dbb6bf64
  1. 2
      doc/api/util.markdown
  2. 5
      lib/util.js

2
doc/api/util.markdown

@ -167,6 +167,8 @@ formatted according to the returned Object. This is similar to how
## util.isArray(object)
Internal alias for Array.isArray.
Returns `true` if the given "object" is an `Array`. `false` otherwise.
var util = require('util');

5
lib/util.js

@ -505,10 +505,7 @@ function reduceToSingleString(output, base, braces) {
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) {
return Array.isArray(ar);
}
exports.isArray = isArray;
var isArray = exports.isArray = Array.isArray;
function isBoolean(arg) {
return typeof arg === 'boolean';

Loading…
Cancel
Save