summaryrefslogtreecommitdiffstats
path: root/src/array.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/array.js')
-rw-r--r--src/array.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/array.js b/src/array.js
index f8e63d08..94d74a50 100644
--- a/src/array.js
+++ b/src/array.js
@@ -1058,6 +1058,10 @@ function ArrayReduceRight(callback, current) {
return current;
}
+// ES5, 15.4.3.2
+function ArrayIsArray(obj) {
+ return IS_ARRAY(obj);
+}
// -------------------------------------------------------------------
@@ -1075,6 +1079,11 @@ function SetupArray() {
// object.
%SetProperty($Array.prototype, "constructor", $Array, DONT_ENUM);
+ // Setup non-enumerable functions on the Array object.
+ InstallFunctions($Array, DONT_ENUM, $Array(
+ "isArray", ArrayIsArray
+ ));
+
// Setup non-enumerable functions of the Array.prototype object and
// set their names.
InstallFunctionsOnHiddenPrototype($Array.prototype, DONT_ENUM, $Array(
@@ -1098,8 +1107,9 @@ function SetupArray() {
"indexOf", ArrayIndexOf,
"lastIndexOf", ArrayLastIndexOf,
"reduce", ArrayReduce,
- "reduceRight", ArrayReduceRight));
-
+ "reduceRight", ArrayReduceRight
+ ));
+
// Manipulate the length of some of the functions to meet
// expectations set by ECMA-262 or Mozilla.
UpdateFunctionLengths({