{"library":"unctx","type":"library","category":null,"description":"Unctx is a lightweight JavaScript library that implements the Composition API pattern, popularized by Vue.js, in vanilla JS. It empowers developers to structure complex logic into reusable functions and manage context-like state within their libraries and applications. The current stable version is 2.5.0, with consistent releases indicating active development. A key differentiator is its robust handling of asynchronous contexts, offering support for Node.js's native `AsyncLocalStorage` for persistence across async operations, alongside a build-time transformation for environments lacking native support. It also features a global namespacing mechanism via `globalThis` to mitigate context conflicts across multiple library instances or versions, emphasizing unique and verbose keys for stability.","language":"javascript","status":"active","version":"2.5.0","tags":["javascript","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install unctx","imports":["import { createContext } from 'unctx'","import { useContext } from 'unctx'","import { unctxPlugin } from 'unctx/plugin'","import { AsyncLocalStorage } from 'node:async_hooks'"]},{"cmd":"yarn add unctx","imports":[]},{"cmd":"pnpm add unctx","imports":[]}],"homepage":null,"github":"https://github.com/unjs/unctx","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/unctx","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/unctx/compatibility"}}