
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
node-csp-channels
Advanced tools
CSP style concurrency based off Tony Hoare's formal language.
npm install --save node-csp-channels
const Channel = require('node-csp-channels').default;
or if using newer syntax or babel
import Channel from 'node-csp-channels';
Then simply:
const myChannel = new Channel();
(async () => {
await myChannel.put('Hello world!');
const res = await myChannel.take();
console.log(res); // Prints 'Hello world!'
})();
This is best used with async/await and hasn't been tested with promises or other concurrency libs.
Channel.put(obj)Takes a JavaScript object and places it on the channel. If the channel is occupied it will wait until it is free (possibly blocking forever) and then place the data on. You can wait for the put to succeed by calling:
await Channel.put(obj).
Channel.take()Will take the next available value off the channel. If the channel has no value it will wait until there is a value, then return the data. If you require the value before proceeding you can await it.
const result = await Channel.take()
If you want to build locally just clone the repository and run npm run build to create the lib folder. If you want to run tests just run npm test.
If you want to contribute please follow the eslint guidelines and ensure all code follows the style guidelines and has tests before submitting a pull request.
FAQs
CSP style channels in JavaScript
We found that node-csp-channels demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.