Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

duktape-vm

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duktape-vm - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

build/index.d.ts
export interface DuktapeExport {
destroy: () => void;
eval: (js: string, safe?: boolean) => string;
eval: (js: string) => string;
onMessage: (callback: (msg: string) => void) => void;

@@ -5,0 +5,0 @@ message: (msg: string) => void;

{
"name": "duktape-vm",
"version": "0.0.2",
"version": "0.0.3",
"description": "Javascript VM running in WebAssembly",

@@ -5,0 +5,0 @@ "main": "build/ducktape-vm.js",

@@ -13,3 +13,3 @@ # Duktape Javascript Virtual Machine

- Supports bidirectional messaging.
- Only 140KB gzipped.
- Only 110KB gzipped.

@@ -30,6 +30,8 @@ ## 2 minute example

// print to parent console
vm_breakout("console.log(" + message + ");")
vm_breakout("console.log('" + message + "');")
};
exports.someObj = ${JSON.stringify(obj)};
// you can also inline js libraries here
`);

@@ -41,2 +43,3 @@

// Messaging API
vm.eval(`

@@ -85,10 +88,10 @@ exports.onMessage(function(msg) {

```html
<!-- Webassembly Only Version (Fast with 75% browser support), 140KB -->
<script src="https://cdn.jsdelivr.net/npm/duktape-vm@0.0.2/build/duktape-vm.min.js"></script>
<!-- Webassembly Only Version (Fast with 75% browser support), 110KB -->
<script src="https://cdn.jsdelivr.net/npm/duktape-vm@0.0.3/build/duktape-vm.min.js"></script>
<!-- AsmJS Only Version (Slower with 95% browser support), 150KB -->
<script src="https://cdn.jsdelivr.net/npm/duktape-vm@0.0.2/build/duktape-vm.min.asm.js"></script>
<!-- AsmJS Only Version (Slower with 95% browser support), 115KB -->
<script src="https://cdn.jsdelivr.net/npm/duktape-vm@0.0.3/build/duktape-vm.min.asm.js"></script>
<!-- Webassembly AND AsmJS Version (Fast with 95% browser support), 280KB -->
<script src="https://cdn.jsdelivr.net/npm/duktape-vm@0.0.2/build/duktape-vm.min.both.js"></script>
<!-- Webassembly AND AsmJS Version (Fast with 95% browser support), 220KB -->
<script src="https://cdn.jsdelivr.net/npm/duktape-vm@0.0.3/build/duktape-vm.min.both.js"></script>
```

@@ -95,0 +98,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc