diff options
author | Evan Carroll <me@evancarroll.com> | 2014-04-01 19:04:15 -0500 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-04-03 22:39:42 +0400 |
commit | 95dbb6bf647d90947c0c738533dadf391559be98 (patch) | |
tree | aad8741d5de34574e84645dba47f9afb023867e8 | |
parent | 42a33c1bb869a8fd64525ae282a0ab1d859218a9 (diff) | |
download | node-new-95dbb6bf647d90947c0c738533dadf391559be98.tar.gz |
util: made util.isArray a direct alias for Array.isArray
-rw-r--r-- | doc/api/util.markdown | 2 | ||||
-rw-r--r-- | lib/util.js | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/doc/api/util.markdown b/doc/api/util.markdown index b9196395ea..2aab8c95c0 100644 --- a/doc/api/util.markdown +++ b/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'); diff --git a/lib/util.js b/lib/util.js index 25220e89d0..2de944586f 100644 --- a/lib/util.js +++ b/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'; |