Skip to content

Instantly share code, notes, and snippets.

@indutny
Created November 17, 2010 09:59
Show Gist options
  • Select an option

  • Save indutny/703211 to your computer and use it in GitHub Desktop.

Select an option

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"
@indutny
Copy link
Copy Markdown
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