New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wasmoon

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wasmoon - npm Package Compare versions

Comparing version 1.0.19 to 1.0.20

dist/global.d.ts

17

dist/engine.d.ts

@@ -0,19 +1,10 @@

import Global from './global';
import LuaWasm from './luawasm';
import { LuaState } from './types';
export default class Lua extends LuaWasm {
private readonly functionRegistry;
private Main;
export default class Lua {
global: Global;
constructor();
registerStandardLib(): void;
doString(script: string): any;
getGlobal(name: string): any;
setGlobal(name: string, value: any): void;
callGlobal(name: string, ...args: any[]): any[];
mountFile(path: string, content: string | ArrayBufferView): void;
close(): void;
private pushValue;
private getValue;
private getTableValue;
private get isClosed();
dumpStack(L?: LuaState): void;
static ensureInitialization: typeof LuaWasm.ensureInitialization;
}
export { default as Lua } from './engine';
export { Thread } from './types';
export { default as Thread } from './thread';
export { default as MultiReturn } from './multireturn';

@@ -10,38 +10,39 @@ /// <reference types="emscripten" />

export default class LuaWasm {
protected static module: LuaEmscriptenModule;
constructor();
static module: LuaEmscriptenModule;
static ensureInitialization(customName?: string): Promise<void>;
protected static luaL_newstate: () => LuaState;
protected static luaL_openlibs: (L: LuaState) => void;
protected static clua_dostring: (L: LuaState, code: string) => LuaReturn;
protected static lua_getglobal: (L: LuaState, name: string) => LuaType;
protected static clua_tonumber: (L: LuaState, idx: number) => number;
protected static clua_tostring: (L: LuaState, idx: number) => string;
protected static lua_toboolean: (L: LuaState, idx: number) => boolean;
protected static lua_topointer: (L: LuaState, idx: number) => number;
protected static lua_tothread: (L: LuaState, idx: number) => number;
protected static lua_gettable: (L: LuaState, idx: number) => number;
protected static lua_next: (L: LuaState, idx: number) => boolean;
protected static lua_type: (L: LuaState, idx: number) => LuaType;
protected static clua_pop: (L: LuaState, idx: number) => void;
protected static clua_dump_stack: (L: LuaState) => void;
protected static lua_pushnil: (L: LuaState) => void;
protected static lua_pushvalue: (L: LuaState, idx: number) => void;
protected static lua_pushinteger: (L: LuaState, integer: number) => void;
protected static lua_pushnumber: (L: LuaState, number: number) => void;
protected static lua_pushstring: (L: LuaState, string: string) => void;
protected static lua_pushboolean: (L: LuaState, boolean: boolean) => void;
protected static lua_pushthread: (L: LuaState) => number;
protected static lua_setglobal: (L: LuaState, name: string) => void;
protected static clua_newtable: (L: LuaState) => void;
protected static lua_gettop: (L: LuaState) => number;
protected static lua_settable: (L: LuaState, idx: number) => void;
protected static clua_call: (L: LuaState, nargs: number, nresults: number) => void;
protected static clua_pushcfunction: (L: LuaState, cfunction: number) => void;
protected static luaL_ref: (L: LuaState, table: number) => number;
protected static luaL_unref: (L: LuaState, table: number, ref: number) => void;
protected static lua_rawgeti: (L: LuaState, idx: number, ref: number) => number;
protected static lua_close: (L: LuaState) => void;
static luaL_newstate: () => LuaState;
static luaL_openlibs: (L: LuaState) => void;
static luaL_loadstring: (L: LuaState, code: string) => LuaReturn;
static lua_getglobal: (L: LuaState, name: string) => LuaType;
static lua_tonumberx: (L: LuaState, idx: number, isnum: number) => number;
static lua_tolstring: (L: LuaState, idx: number, size: number) => string;
static lua_toboolean: (L: LuaState, idx: number) => boolean;
static lua_topointer: (L: LuaState, idx: number) => number;
static lua_tothread: (L: LuaState, idx: number) => number;
static lua_gettable: (L: LuaState, idx: number) => number;
static lua_next: (L: LuaState, idx: number) => boolean;
static lua_type: (L: LuaState, idx: number) => LuaType;
static lua_pushnil: (L: LuaState) => void;
static lua_pushvalue: (L: LuaState, idx: number) => void;
static lua_pushinteger: (L: LuaState, integer: number) => void;
static lua_pushnumber: (L: LuaState, number: number) => void;
static lua_pushstring: (L: LuaState, string: string) => void;
static lua_pushboolean: (L: LuaState, boolean: boolean) => void;
static lua_pushthread: (L: LuaState) => number;
static lua_setglobal: (L: LuaState, name: string) => void;
static lua_setmetatable: (L: LuaState, idx: number) => void;
static lua_createtable: (L: LuaState, narr: number, nrec: number) => void;
static lua_gettop: (L: LuaState) => number;
static lua_settop: (L: LuaState, idx: number) => void;
static lua_settable: (L: LuaState, idx: number) => void;
static lua_callk: (L: LuaState, nargs: number, nresults: number, ctx: number, func: number) => void;
static lua_pcallk: (L: LuaState, nargs: number, nresults: number, msgh: number, ctx: number, func: number) => number;
static lua_pushcclosure: (L: LuaState, cfunction: number, n: number) => void;
static luaL_ref: (L: LuaState, table: number) => number;
static luaL_unref: (L: LuaState, table: number, ref: number) => void;
static lua_rawgeti: (L: LuaState, idx: number, ref: number) => number;
static lua_typename: (L: LuaState, type: LuaType) => number;
static lua_close: (L: LuaState) => void;
private static bindWrappedFunctions;
}
export {};

@@ -1,4 +0,2 @@

export declare class Thread extends Number {
}
export declare type LuaState = Thread | number;
export declare type LuaState = number;
export declare const enum LuaReturn {

@@ -5,0 +3,0 @@ Ok = 0,

{
"name": "wasmoon",
"version": "1.0.19",
"version": "1.0.20",
"description": "A real lua VM with JS bindings made with webassembly",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -44,6 +44,6 @@ # Wasmoon

const state = new Lua();
state.registerStandardLib();
try {
state.registerStandardLib();
state.setGlobal('sum', (x, y) => x + y);
state.global.set('sum', (x, y) => x + y);
state.doString(`

@@ -55,3 +55,3 @@ print(sum(10, 10))

`);
const multiply = state.getGlobal('multiply');
const multiply = state.global.get('multiply');
console.log(multiply(10, 10))

@@ -58,0 +58,0 @@ } finally {

Sorry, the diff of this file is not supported yet

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

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