FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: support revert array in vm by mytEcust · Pull Request #69 · node-modules/js-to-java · GitHub

Repository navigation

feat: support revert array in vm - #69

Merged
fengmk2 merged 1 commit into
node-modules:masterfrom
mytEcust:feat/revertArrayInVm
Jul 11, 2023
Merged

fengmk2 merged 1 commit into
node-modules:masterfrom
mytEcust:feat/revertArrayInVm

Conversation

mytEcust commented Jul 10, 2023 •
edited
Loading

Copy link
Copy Markdown
Contributor

support revert in vm

Array.isArray(new vm.Script('[]').runInNewContext({}))
true
new vm.Script('[]').runInNewContext({}) instanceof Array
false

mytEcust force-pushed the feat/revertArrayInVm branch from 69ae281 to d44ed60 Compare July 10, 2023 09:58
Comment thread lib/revert.js Outdated
Comment thread lib/revert.js
Object.prototype.toString.call(java) === '[object Boolean]'||
Object.prototype.toString.call(java) === '[object Date]' ||
Object.prototype.toString.call(java) === '[object Number]' ||
Object.prototype.toString.call(java) === '[object RegExp]' ||

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

原来的 instanceof 也留着?全靠 toString 判断我也担心没法覆盖全。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

已保留

mytEcust force-pushed the feat/revertArrayInVm branch from a46ead2 to db38a57 Compare July 10, 2023 14:30
fengmk2 merged commit dcb2384 into node-modules:master Jul 11, 2023

fengmk2 commented Jul 11, 2023

Copy link
Copy Markdown
Member

我改动 github action 跑完之后发一个版本。

fengmk2 pushed a commit that referenced this pull request Jul 11, 2023
[skip ci]

## [2.8.0](v2.7.0...v2.8.0) (2023-07-11)

### Features

* support revert array in vm ([#69](#69)) ([dcb2384](dcb2384))

fengmk2 commented Jul 11, 2023

Copy link
Copy Markdown
Member

2.8.0

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL