Skip to main content

Built and signed on GitHub Actions

Structured Concurrency and Effects for JavaScript

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 weeks ago (3.4.0)

npm bundle size (minified + gzip) License: MIT Created by Frontside Chat on Discord

Effection

Structured concurrency and effects for JavaScript.

Why use Effection?

Effection leverages the idea of structured concurrency to ensure that you don't leak any resources, effects, and that cancellation is always properly handled. It helps you build concurrent code that feels rock solid at scale, and it does all of this while feeling like normal JavaScript.

Learn how to use Effection in your own project

Platforms

Effection runs on all major JavaScript platforms including NodeJs, Browser, and Deno. It is published on both npm and deno.land.

Contributing to Website

Go to website's readme to learn how to contribute to the website.

Development

Deno is the primary tool used for development, testing, and packaging.

Testing

To run tests:

$ deno task test

Building NPM Packages

If you want to build a development version of the NPM package so that you can link it locally, you can use the build:npm script and passing it a version number. for example:

$ deno task build:npm 3.0.0-mydev-snapshot.0
Task build:npm deno run -A tasks/build-npm.ts "3.0.0-mydev-snapshot.0"
[dnt] Transforming...
[dnt] Running npm install...

up to date, audited 1 package in 162ms

found 0 vulnerabilities
[dnt] Building project...
[dnt] Emitting ESM package...
[dnt] Emitting script package...
[dnt] Complete!

Now, the built npm package can be found in the build/npm directory.

Built and signed on
GitHub Actions
View transparency log

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@effection/effection

Import symbol

import * as effection from "@effection/effection";
or

Import directly with a jsr specifier

import * as effection from "jsr:@effection/effection";

Add Package

pnpm i jsr:@effection/effection
or (using pnpm 10.8 or older)
pnpm dlx jsr add @effection/effection

Import symbol

import * as effection from "@effection/effection";

Add Package

yarn add jsr:@effection/effection
or (using Yarn 4.8 or older)
yarn dlx jsr add @effection/effection

Import symbol

import * as effection from "@effection/effection";

Add Package

npx jsr add @effection/effection

Import symbol

import * as effection from "@effection/effection";

Add Package

bunx jsr add @effection/effection

Import symbol

import * as effection from "@effection/effection";