util: made util.isArray a direct alias for Array.isArray
This commit is contained in:
parent
42a33c1bb8
commit
95dbb6bf64
@ -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');
|
||||
|
@ -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…
x
Reference in New Issue
Block a user