File: use-builtin-indexof.patch

package info (click to toggle)
node-vm-browserify 0.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 128 kB
  • ctags: 44
  • sloc: makefile: 2; sh: 2
file content (17 lines) | stat: -rw-r--r-- 586 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/index.js
+++ b/index.js
@@ -1,5 +1,3 @@
-var indexOf = require('indexof');
-
 var Object_keys = function (obj) {
     if (Object.keys) return Object.keys(obj)
     else {
@@ -85,7 +83,7 @@
         // Avoid copying circular objects like `top` and `window` by only
         // updating existing context properties or new properties in the `win`
         // that was only introduced after the eval.
-        if (key in context || indexOf(winKeys, key) === -1) {
+        if (key in context || winKeys.indexOf(key) === -1) {
             context[key] = win[key];
         }
     });