JavaScript

NumKong for JavaScript

npm install numkong 8.0.0-rc.1 · b1f866ab

It keeps the JS surface intentionally compact: dense distances, dot products, binary metrics, probability divergences, packed GEMM-like matrix multiplication, symmetric Gram matrices, dtype-tagged low-precision storage, typed views, and runtime capability inspection.

Topics

InstallationThe package targets Node >= 22.
Quickstart
HighlightsThis SDK is deliberately smaller than Python or Rust.
Scalar Types34JavaScript has no built-in f16, bf16, fp8, or packed-bit numeric model.
Tensors and Views75The wrapper hierarchy exists to keep dtype and ownership explicit across addon and WASM boundaries.
Dot Products2Dot products are separate from distances because dtype tagging and low-precision storage matter more here.
Dense Distances3Dense distance entrypoints work directly on the standard numeric TypedArray types.
Set Similarity3Binary metrics operate on packed storage rather than on generic boolean arrays.
Probability Metrics2These call the underlying SIMD divergence kernels directly.
Matrix Kernels18
Runtime Dispatch10
Platform NotesThe npm package includes pre-built WASM modules under wasm/, one per SIMD capability and address width: numkong-wasm32-serial, numkong-wasm32-v128, numkong-wasm32-v128relaxed, and numkong-wasm64-v128relaxed.