Browse Source

Implementing Array.isArray

Sebastien Ros 12 years ago
parent
commit
651ca0f73d
1 changed files with 7 additions and 1 deletions
  1. 7 1
      Jint/Native/Array/ArrayConstructor.cs

+ 7 - 1
Jint/Native/Array/ArrayConstructor.cs

@@ -38,7 +38,13 @@ namespace Jint.Native.Array
 
         private object IsArray(object thisObj, object[] arguments)
         {
-            throw new NotImplementedException();
+            if (arguments.Length == 0)
+            {
+                return false;
+            }
+
+            var o = arguments[0] as ObjectInstance;
+            return o != null && o.Class == "Array";
         }
 
         public override object Call(object thisObject, object[] arguments)