
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.
A very simple Mutex, with an easy to use API and excellent TypeScript typings.
A very simple Mutex, with an easy to use API and excellent TypeScript typings.
npm install --save ts-mutex
import Mutex = require('mutex')
const lock = new Mutex()
// Only one request will be sent at a time
lock.use(async () => {
console.log((await fetch('https://google.com/')).code)
})
lock.use(async () => {
console.log((await fetch('https://twitter.com/')).code)
})
lock.use(async () => {
console.log((await fetch('https://facebook.com/')).code)
})
new Mutex()Creates a new Mutex instance.
Mutex#locked: booleanWhether the mutex is currently locked or not.
Mutex#use<T> (fn: () => T | PromiseLike<T>): Promise<T>Aquire the lock, then execute (possibly async) function fn, and finally release the lock. Returns a Promise of whatever the function fn returns.
The lock will be released even if fn throws or returns a rejected Promise. In this case, the Promise returned will also be rejected with that error.
FAQs
A very simple Mutex, with an easy to use API and excellent TypeScript typings.
The npm package ts-mutex receives a total of 35 weekly downloads. As such, ts-mutex popularity was classified as not popular.
We found that ts-mutex 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.