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

napi-wasm

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

napi-wasm - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

42

index.js
const NAPI_OK = 0;
const NAPI_INVALID_ARG = 1;
const NAPI_STRING_EXPECTED = 3;
const NAPI_NUMBER_EXPECTED = 6;
const NAPI_BOOLEAN_EXPECTED = 7;
const NAPI_GENERIC_FAILURE = 9;

@@ -6,2 +10,3 @@ const NAPI_PENDING_EXCEPTION = 10;

const NAPI_HANDLE_SCOPE_MISMATCH = 13;
const NAPI_BIGINT_EXPECTED = 17;
const NAPI_NO_EXTERNAL_BUFFERS_ALLOWED = 22;

@@ -584,2 +589,5 @@

let val = env.get(value);
if (typeof val !== "boolean") {
return NAPI_BOOLEAN_EXPECTED;
}
env.memory[result] = val ? 1 : 0;

@@ -595,2 +603,5 @@ return NAPI_OK;

let val = env.get(value);
if (typeof val !== "number") {
return NAPI_NUMBER_EXPECTED;
}
env.i32[result >> 2] = val;

@@ -606,2 +617,5 @@ return NAPI_OK;

let val = env.get(value);
if (typeof val !== "number") {
return NAPI_NUMBER_EXPECTED;
}
return env.setPointer(result, val);

@@ -616,2 +630,5 @@ },

let val = env.get(value);
if (typeof val !== "number") {
return NAPI_NUMBER_EXPECTED;
}
env.i64[result >> 3] = val;

@@ -627,2 +644,5 @@ return NAPI_OK;

let val = env.get(value);
if (typeof val !== "number") {
return NAPI_NUMBER_EXPECTED;
}
env.f64[result >> 3] = val;

@@ -638,2 +658,5 @@ return NAPI_OK;

let val = env.get(value);
if (typeof val !== "bigint") {
return NAPI_BIGINT_EXPECTED;
}
env.i64[result >> 3] = val;

@@ -652,2 +675,5 @@ if (lossless) {

let val = env.get(value);
if (typeof val !== "bigint") {
return NAPI_BIGINT_EXPECTED;
}
env.u64[result >> 3] = val;

@@ -678,2 +704,6 @@ if (lossless) {

let val = env.get(value);
if (typeof val !== "bigint") {
return NAPI_BIGINT_EXPECTED;
}
let count = env.u32[word_count >> 2];

@@ -1107,2 +1137,5 @@

let val = env.get(value);
if (typeof val !== "string") {
return NAPI_STRING_EXPECTED;
}
if (buf == 0) {

@@ -1123,2 +1156,5 @@ return env.setPointer(result, utf8Length(val));

let val = env.get(value);
if (typeof val !== "string") {
return NAPI_STRING_EXPECTED;
}
if (buf == 0) {

@@ -1144,2 +1180,5 @@ return env.setPointer(result, val.length);

let val = env.get(value);
if (typeof val !== "string") {
return NAPI_STRING_EXPECTED;
}
if (buf == 0) {

@@ -1363,2 +1402,5 @@ return env.setPointer(result, val.length);

let val = env.externalObjects.get(external);
if (!val) {
return NAPI_INVALID_ARG;
}
return env.setPointer(result, val);

@@ -1365,0 +1407,0 @@ },

2

package.json
{
"name": "napi-wasm",
"version": "1.1.2",
"version": "1.1.3",
"description": "An implementation of napi for wasm",

@@ -5,0 +5,0 @@ "main": "index.mjs",

Sorry, the diff of this file is not supported yet

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