@usecolf/node
v1.0.1
Published
COLF Node.js SDK with Ed25519 local license validation, columnar optimizer, and native binding support
Downloads
362
Readme
@usecolf/node
COLF Node.js SDK with Ed25519 local license validation, columnar payload optimization, and native performance helpers.
Overview
@usecolf/node is the primary Node.js SDK for integrating COLF (Columnar Optimized List Format) into backend applications. It handles license verification, automatic payload encoding, performance statistics, and memory optimization.
Features
- Local Ed25519 Validation: Validates COLF license tokens locally in Node.js processes without runtime HTTP requests.
- High Throughput Encoding: Optimized columnar encoding for API responses with thousands of array rows.
- Automatic Fallback: Safely falls back to raw JSON when payload size or row counts do not benefit from compression.
Installation
npm install @usecolf/node
# or
pnpm add @usecolf/nodeQuick Start
import { createColf } from '@usecolf/node';
const colf = await createColf({
license: process.env.COLF_LICENSE,
allowUnlicensed: true
});
const dataset = [
{ id: 101, name: 'Widget A', price: 29.99 },
{ id: 102, name: 'Widget B', price: 49.99 }
];
const encoded = colf.encode(dataset);
console.log(encoded);License
MIT © COLF Team
