slownode

raw JSON →
0.5.3 verified Fri May 01 auth: no javascript

slownode is a minimal npm package (v0.5.3) that provides persistent event loop, emitter, promise, and slow function utilities. It ships with TypeScript type definitions. The package is in early development with many terms marked as TODO in the README. It is primarily an experimental tool for working with persistent event loops and custom JASM bytecode interpretation. Current release cadence is unknown. Differentiators include a unique bytecode interpreter approach (JASM) and persistent event loop patterns. Not suitable for production use.

error Cannot find module 'slownode'
cause Package not installed or not in node_modules.
fix
Run npm install slownode --save
error ERR_REQUIRE_ESM: require() of ES Module not supported
cause Using CommonJS require() on an ESM-only package.
fix
Use import statement or dynamic import().
error TypeError: createEventLoop is not a function
cause Incorrect import: either wrong symbol or default import used.
fix
Ensure correct named import: import { createEventLoop } from 'slownode'
gotcha Package is in early development; many features are incomplete or marked as TODO.
fix Check the GitHub repository for the latest status and roadmap.
breaking The API is unstable and may change without notice between minor versions.
fix Pin to exact version and test upgrades carefully.
gotcha Documentation is minimal; many terms (KVON, JASM, Epoch) are undefined.
fix Refer to the GitHub repository for source code and examples.
gotcha No tests or CI are publicly visible; reliability is unknown.
fix Evaluate risk for production use; consider alternative packages.
npm install slownode
yarn add slownode
pnpm add slownode

Creates a persistent event loop and a JASM bytecode interpreter, then runs the loop for 5 seconds.

import { createEventLoop, JASMInterpreter } from 'slownode';

const loop = createEventLoop();
const interpreter = new JASMInterpreter();

loop.on('tick', () => {
  console.log('Tick');
});

loop.start();

// After some time
setTimeout(() => loop.stop(), 5000);