Skip to content

Instantly share code, notes, and snippets.

@indutny
Created November 17, 2010 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indutny/703211 to your computer and use it in GitHub Desktop.
Save indutny/703211 to your computer and use it in GitHub Desktop.
Node.js runInNewContext problem
var vm = require('vm');
var pseudo_array = vm.runInNewContext('[]');
console.log(pseudo_array instanceof Array); // Voila! "false"
@shimondoodkin
Copy link

lol + like

@indutny
Copy link
Author

indutny commented Dec 29, 2010

Actually, you can check this using Array.isArray(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment