# 介绍
调用 node 执行 js ,可指定编码格式
# 安装
```
pip install -U grun_js
```
# 示例
```
# run_js = RunJs(path='test.js')
run_js = RunJs(content='''
function getCookie(){
return arguments
}
''')
result = run_js.run('getCookie', 'Gk')
print(result)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Leviathangk/runjs",
"name": "grun-js",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "js,grun_js,pyexecjs",
"author": "\u90ed\u4e00\u4f1a\u513f",
"author_email": "1015295213@qq.com",
"download_url": "https://files.pythonhosted.org/packages/7c/21/f5f159333abf25693615df701d5f542220767c4851060d22d643033afd4d/grun_js-0.0.3.tar.gz",
"platform": "any",
"description": "# \u4ecb\u7ecd\r\n\r\n\u8c03\u7528 node \u6267\u884c js \uff0c\u53ef\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\r\n\r\n# \u5b89\u88c5\r\n\r\n```\r\npip install -U grun_js\r\n```\r\n\r\n# \u793a\u4f8b\r\n\r\n```\r\n # run_js = RunJs(path='test.js')\r\n run_js = RunJs(content='''\r\n function getCookie(){\r\n return arguments\r\n }\r\n ''')\r\n result = run_js.run('getCookie', 'Gk')\r\n print(result)\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT Licence",
"summary": "\u8c03\u7528 node \u6267\u884c js\uff0c\u53ef\u6307\u5b9a\u7f16\u7801",
"version": "0.0.3",
"split_keywords": [
"js",
"grun_js",
"pyexecjs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7c21f5f159333abf25693615df701d5f542220767c4851060d22d643033afd4d",
"md5": "05bf58cf7ac4d7ba1ec7aa707fb5bd69",
"sha256": "95dec2cfef5073bb2b6037f899d15543ee9599d55a6441f50835b84a7ccbf0cb"
},
"downloads": -1,
"filename": "grun_js-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "05bf58cf7ac4d7ba1ec7aa707fb5bd69",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2699,
"upload_time": "2023-04-24T06:39:14",
"upload_time_iso_8601": "2023-04-24T06:39:14.989637Z",
"url": "https://files.pythonhosted.org/packages/7c/21/f5f159333abf25693615df701d5f542220767c4851060d22d643033afd4d/grun_js-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-24 06:39:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Leviathangk",
"github_project": "runjs",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "grun-js"
}