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

This commit is contained in:
Evan Carroll 2014-04-01 19:04:15 -05:00 committed by Fedor Indutny
parent 42a33c1bb8
commit 95dbb6bf64
2 changed files with 3 additions and 4 deletions

View File

@ -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');

View File

@ -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';