Prochain
Proxified Promise Chain in JavaScript
Install / Use
/learn @shigma/ProchainREADME
prochain
Proxified Promise Chain in JavaScript.
It allows for method and property chaining without need for intermediate then() or await for cleaner and simpler code.
const { wrap } = require('prochain')
// Instead of thens
fetch(url)
.then(res => res.json())
.then(json => json.foo.bar)
.then(value => console.log(value))
// Instead of awaits
const res = await fetch(url)
const json = await res.json()
const value = json.foo.bar
console.log(value)
// With prochain
const value = await wrap(fetch(url)).json().foo.bar
console.log(value)
// Or you can even create a wrapped fetch
const wrapFetch = wrap(fetch)
const value = await wrapFetch(url).json().foo.bar
console.log(value)
Related Skills
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
107.2kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
review-duplication
100.1kUse this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.
