{"id":40716,"library":"cjs","title":"cjs (Concurrent JavaScript)","description":"A minimal concurrency library for JavaScript inspired by Go's channels and CSP. Provides channel-based communication with read/write operations and select-like event multiplexing. Requires Node.js and uses callback-style async. Version 0.0.11 is the latest but appears abandoned with no updates since 2013. Package name collision with CommonJS module system; not related.","status":"abandoned","version":"0.0.11","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install cjs","lang":"bash","label":"npm"},{"cmd":"yarn add cjs","lang":"bash","label":"yarn"},{"cmd":"pnpm add cjs","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-capable but CommonJS require works; prefer import for ES modules.","wrong":"const cjs = require('cjs')","symbol":"cjs","correct":"import cjs from 'cjs'"},{"note":"Not exported as named export; use default import then cjs.newChannel.","wrong":"import { newChannel } from 'cjs'","symbol":"newChannel","correct":"import { newChannel } from 'cjs'"}],"quickstart":{"code":"import cjs from 'cjs';\n\nconst channel = cjs.newChannel();\n\nchannel.read((value) => {\n  console.log('value read', value);\n});\n\nchannel.write(123, () => {\n  console.log('value written');\n});","lang":"typescript","description":"Creates a channel, reads and writes a value asynchronously using callbacks."},"warnings":[{"fix":"Consider using modern alternatives like 'async' or reactive streams.","message":"Package has not been updated since 2013; may have unpatched vulnerabilities.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Always handle errors in callbacks, or wrap in try-catch.","message":"Callback error handling is minimal; errors may be swallowed.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.0.11':40 '2013':51 'abandon':46 'appear':45 'async':38 'base':20 'callback':36 'callback-styl':35 'channel':14,19 'channel-bas':18 'cjs':1 'collis':54 'commonj':56 'communic':21 'concurr':2,6 'csp':16 'event':29 'go':12 'inspir':10 'javascript':3,9,61 'latest':43 'librari':7 'like':28 'minim':5 'modul':57 'multiplex':30 'name':53 'node.js':32 'oper':24 'packag':52 'provid':17 'read/write':23 'relat':60 'requir':31 'select':27 'select-lik':26 'sinc':50 'style':37 'system':58 'updat':49 'use':34 'version':39","created_at":"2026-06-04T18:48:55.503593+00:00","updated_at":"2026-06-04T18:48:55.503593+00:00","problems":[{"fix":"Run 'npm install cjs' and ensure node_modules is present.","cause":"Package not installed or module resolution failure.","error":"Error: Cannot find module 'cjs'"},{"fix":"Use default import: import cjs from 'cjs'; then cjs.newChannel().","cause":"Importing as named export incorrectly.","error":"TypeError: cjs.newChannel is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"cjs","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}