
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
Simple helper for building async chainable classes without external dependencies
Simple helper for building async chainable classes without external dependencies
Chainik means teapot in Russian. I took this name because it associated with chains and cantik, which means beautiful in Indonesian and some other languages. Also, other names containing chain word and suitable for this module was occupied in NPM.
npm i -g chainik
import Chainik from 'chainik'
const delay = (t: number) => new Promise(r => setTimeout(r, t))
type Data = string[]
type Params = { foo: string }
class Chainable extends Chainik<Data, Params> {
step1(d: number) {
console.log('queued step1')
return this.queue(async () => {
await delay(d)
this.data.push('step1')
console.log('executed step1')
})
}
step2(d: number) {
console.log('queued step2')
return this.queue(async () => {
await delay(d)
this.data.push('step2')
console.log('executed step2')
})
}
step3() {
console.log('queued step3')
return this.queue(() => {
// Using params from constructor as context
this.data.push(`using ctor param: ${this.params.foo}`)
console.log('executed step3')
})
}
}
async function main() {
console.log('started')
const chain = new Chainable([], { foo: 'bar' })
const data = await chain.step1(1000).step2(2000).step3().exec()
console.log('data: ', data)
}
if (require.main === module) {
main()
}
FAQs
Simple helper for building async chainable classes without external dependencies
We found that chainik 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.