diff --git a/chai-angular.js b/chai-angular.js
index <HASH>..<HASH> 100644
--- a/chai-angular.js
+++ b/chai-angular.js
@@ -74,8 +74,10 @@
 
         var objKeys, expectedKeys;
         try {
-            objKeys = keys(obj, true);
-            expectedKeys = keys(expected);
+            objKeys = Object.keys(obj).filter(function(key) {
+                return !resourceOwnProperties[key];
+            });
+            expectedKeys = Object.keys(expected);
         } catch (e) {
             return false;
         }
@@ -91,18 +93,4 @@
             return expectedKeys[i] === key && _.eql(obj[key], expected[key]);
         });
     }
-
-    function keys(obj, ignoreResourceProperties) {
-        /* jshint forin: false */
-        var a = [];
-        for (var key in obj) {
-            if (obj.hasOwnProperty(key)) {
-                if (ignoreResourceProperties && resourceProperties[key]) {
-                    continue;
-                }
-                a.push(key);
-            }
-        }
-        return a;
-    }
 });
Replace for... in + hasOwnProperty by Object.keys

Object.keys requires IE9+, but Array.every is already used and also requires IE9+.