{"library":"alscontext","type":"library","category":null,"description":"ALSContext is a Node.js library providing continuation-local storage (CLS) using AsyncLocalStorage with a fallback to a modified cls-hooked for older Node versions (8.12.0+). Current stable version 0.0.3 uses Node's built-in AsyncLocalStorage when available (>=12.17.0 or >=13.10.0) and a polyfill for older versions. It offers a consistent API for context propagation across async callbacks, with flat key-value operations and support for nested contexts. Unlike cls-hooked, nested run() calls create independent child contexts. It includes both a default ALS class (auto-detect) and a CLS class (force polyfill). TypeScript definitions are included and the package is ESM-first but supports CommonJS via named exports.","language":"javascript","status":"active","version":"0.0.3","tags":["javascript","als","cls","async-local-storage","continuous-local-storage","asynchronouslocalstorage","threadlocal","context","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install alscontext","imports":["import ALS from 'alscontext'","const { ALS } = require('alscontext')","import { CLS } from 'alscontext'"]},{"cmd":"yarn add alscontext","imports":[]},{"cmd":"pnpm add alscontext","imports":[]}],"homepage":"https://github.com/Darkripper214/ALS-Context#readme","github":"https://github.com/Darkripper214/ALS-Context","docs":null,"changelog":null,"pypi":null,"npm":"alscontext","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}