-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
54 lines (54 loc) · 2.51 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"name": "vm-browserify",
"version": "0.0.4",
"description": "vm module for the browser",
"main": "index.js",
"repository": {
"type": "git",
"url": "http://github.com/substack/vm-browserify.git"
},
"keywords": [
"vm",
"browser",
"eval"
],
"dependencies": {
"indexof": "0.0.1"
},
"devDependencies": {
"tape": "~2.3.2"
},
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"scripts": {
"test": "tap test/*.js"
},
"license": "MIT",
"testling": {
"files": "test/*.js",
"browsers": [
"ie/6..latest",
"firefox/16..latest",
"firefox/nightly",
"chrome/22..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
},
"readme": "# vm-browserify\n\nemulate node's vm module for the browser\n\n[![testling badge](https://ci.testling.com/substack/vm-browserify.png)](https://ci.testling.com/substack/vm-browserify)\n\n# example\n\nJust write some client-side javascript:\n\n``` js\nvar vm = require('vm');\n\n$(function () {\n var res = vm.runInNewContext('a + 5', { a : 100 });\n $('#res').text(res);\n});\n```\n\ncompile it with [browserify](http://github.com/substack/node-browserify):\n\n```\nbrowserify entry.js -o bundle.js\n```\n\nthen whip up some html:\n\n``` html\n<html>\n <head>\n <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\"></script>\n <script src=\"/bundle.js\"></script>\n </head>\n <body>\n result = <span id=\"res\"></span>\n </body>\n</html>\n```\n\nand when you load the page you should see:\n\n```\nresult = 105\n```\n\n# methods\n\n## vm.runInNewContext(code, context={})\n\nEvaluate some `code` in a new iframe with a `context`.\n\nContexts are like wrapping your code in a `with()` except slightly less terrible\nbecause the code is sandboxed into a new iframe.\n\n# install\n\nThis module is depended upon by browserify, so you should just be able to\n`require('vm')` and it will just work. However if you want to use this module\ndirectly you can install it with [npm](http://npmjs.org):\n\n```\nnpm install vm-browserify\n```\n\n# license\n\nMIT\n",
"readmeFilename": "readme.markdown",
"bugs": {
"url": "https://github.com/substack/vm-browserify/issues"
},
"homepage": "https://github.com/substack/vm-browserify",
"_id": "vm-browserify@0.0.4",
"_from": "vm-browserify@~0.0.1"
}