🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

unrun

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unrun

A tool to load and execute any JavaScript or TypeScript code at runtime.

latest
Source
npmnpm
Version
0.2.26
Version published
Weekly downloads
405K
17.19%
Maintainers
2
Weekly downloads
 
Created
Source

unrun

npm version npm downloads Unit Test

unrun is a tool that enables running and loading any module at runtime (TypeScript, ESM, CJS, JSX, etc.) by bundling it with Rolldown.

Check the documentation for more details.

Install

npm i unrun

Usage

CLI

npx unrun ./path/to/file.ts

Programmatic API

  • Async
import { unrun } from 'unrun'

const { module } = await unrun({
  path: './path/to/file.ts', // Path to the module to load
})
  • Sync
import { unrunSync } from 'unrun'

const { module } = unrunSync({
  path: './path/to/file.ts', // Path to the module to load
})

Credits

unrun is highly inspired by tools like :

FAQs

Package last updated on 22 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts