@azerum/ts-csp
    Preparing search index...

    @azerum/ts-csp

    NPM version

    Go-style/CSP-style channels for TypeScript with async/await. Features:

    • async/await friendly API, for await, AbortSignal for cancellation

    • Buffered & unbuffered channels

    • select() like select{} statement in Go, for reads & writes

    • select() can also take any Promise or any async function that takes AbortSignal

    • Timeout operations with select() + sleep(); abort via AbortSignal with select() + returnOnAbort()

    • The return type of select() is inferred for nice exhaustive matching

    • Operators: merge(), partitionTime()

    • Works in Node.js and browsers; relies on global setTimeout, AbortController, AbortSignal

    • Zero dependencies

    • Thoroughly tested

    For details see API docs

    npm install -E @azerum/ts-csp
    

    Experimental: breaking changes to API are expected

    See src/_examples directory:

    • Go channels
    • Communicating Sequential Processes - CSP
    • @thi.ng/csp - design of return values of read() and tryRead()