Registry / messaging / nisper

nisper

JSON →
library0.8.3jsnpmunverified

Nisper 0.8.3 is an RPC library built on WebSocket and the nisp Lisp-like language. It enables bidirectional, script-based remote procedure calls between Node.js and browser clients. Key differentiators: composable function calls via nisp expressions, built-in Promise support, binary data via custom encoders (e.g., msgpack-lite), auto-reconnect, and same API for all directions. Development appears inactive since 2020; current version is stable but unmaintained.

npm install nisper
INSTALL
IMPORT
SIG · NISPER
N
nisper
messagingjavascriptv0.8.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import nisper from 'nisper'
const nisper = require('nisper')
ESM-only; CommonJS require may fail in recent Node versions
call
import { call } from 'nisper/lib/call'
import call from 'nisper/lib/call'
call is a named export, not default
async
import async from 'nisp/lib/async'
import { async } from 'nisp'
async is a default export from nisp/lib/async subpath

Sets up a bidirectional RPC server and client using nisp expressions for composable remote calls.

// Server import nisper from 'nisper'; import $ from 'nisp/lib/$'; const server = nisper({ wsOptions: { port: 8080 }, sandbox: { $, '+': (a, b) => a + b }, onOpen: (ws) => { server.call(ws, ['-', 2, 1]).then(res => console.log('client res:', res)); } }); // Client (browser or Node) import nisper from 'nisper'; const client = nisper({ url: `ws://127.0.0.1:8080`, sandbox: { '-': (a, b) => a - b } }); client.callx`(+ 1 (+ 1 1))`.then(res => console.log('server res:', res));
Debug
Known issues
deprecatedPackage has not been updated since 2020; no maintenance or security patches.
fix
Consider forking or migrating to alternative RPC libraries like Socket.IO with JSON-RPC.
affects: >=0.8.0
gotchaUsing CommonJS `require` may not work in Node >=12 due to ESM-only exports.
fix
Use `import nisper from 'nisper'` in an ESM context or transpile.
affects: >=12.0.0
gotchaThe `call` function from `nisper/lib/call` is a named export, not default.
fix
Use `import { call } from 'nisper/lib/call'`.
affects: all
breakingNisper depends on `nisp` language; version mismatches may cause runtime errors.
fix
Ensure compatible versions of `nisp` and `nisper` are installed. Pin both in package.json.
affects: >=0.8.0
gotchaBinary data support requires custom `encode`/`decode` functions; default uses JSON which may fail for binary.
fix
Provide encoder/decoder like `msgpack-lite` for binary data.
affects: all
Errors
Common errors & fixes
Cannot find module 'nisper'
Package not installed or ESM import used in CommonJS context.
fix
Run `npm install nisper` and ensure project uses ESM (type: module in package.json) or use dynamic import.
TypeError: nisper is not a function
Wrong import style; `require` returns an object with default export.
fix
Use `import nisper from 'nisper'` or `const nisper = require('nisper').default` if using CommonJS.
call is not a function
Named export `call` incorrectly imported as default.
fix
Use `import { call } from 'nisper/lib/call'`.
Upgrade
Version history
0.8.3latest on npm
Audit
Dependencies
nisprequiredCore language interpreter used to parse and execute nisp expressions
wsrequiredWebSocket server/client for transport layer
Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
packagenisper
nisper — npm install nisper · libregistry