npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

luajit-decompiler

v1.1.1

Published

Origin c++ codes from: https://github.com/marsinator358/luajit-decompiler-v2

Readme

Node LuaJIT Decompiler

Node.js native wrapper for luajit-decompiler-v2.

Build

Requires Node.js 22.22.2+, 24.15.0+, or 26+ (matching the local node-gyp toolchain), Python, and a C++20 compiler. On Windows, install Visual Studio with Desktop development with C++; on macOS, install Xcode Command Line Tools; on Linux, install a C++20 toolchain and make.

Run npm install, then npm run build. The repository declares node-gyp as a development dependency so local builds do not rely on a global installation.

Installation in another project

The package builds its native addon during installation. Package managers that block dependency installation scripts need explicit approval. With npm versions that support allowScripts, add the following to the consuming project's package.json:

{
  "allowScripts": {
    "luajit-decompiler": true
  }
}

Then run npm rebuild luajit-decompiler. This approval belongs to the consuming project; this package cannot authorize its own script in another project.

Usage

const { decompile } = require('luajit-decompiler');
const source = decompile('/absolute/path/to/bytecode.lua');

Run npm test after building. Tests verify module loading and argument/error handling; real bytecode decompilation requires a LuaJIT fixture.

Async API

Use decompileAsync(filePath, { timeout, signal }) to run native work on a worker thread. The synchronous decompile API remains available. Native bindings load on the first decompile call. Each async call creates a worker; callers should limit concurrent calls for large batches. Cancellation rejects promptly, but termination of an executing native call can wait until the native call returns. A worker thread does not isolate native crashes from the process.

File I/O uses standard C++ streams and UTF-8 filesystem paths. CI is configured for Windows, macOS, and Linux with Node 22, 24, and 26. Windows is verified locally; macOS/Linux await CI verification.

Upstream source

AST and condition reconstruction synchronized with marsinator358/luajit-decompiler-v2 commit 6a8a0cec48fdf175dddaca5d3fbfe3aa59b5550a (2026-05-14). CLI progress rendering is omitted; portable file I/O and the Node wrapper remain local adaptations.

Both decompile(input) and decompileAsync(input, options) accept Buffer or Uint8Array as well as a file path. Bytecode is parsed in memory without temporary files. Async input is copied into the worker; the caller buffer is not transferred or detached.