https://github.com/thefrontside/effection
Structured concurrency and effects for JavaScript
https://github.com/thefrontside/effection
algebraic-effects async-await concurrency effects effects-management structured-concurrency task-runner
Last synced: 29 days ago
JSON representation
Structured concurrency and effects for JavaScript
- Host: GitHub
- URL: https://github.com/thefrontside/effection
- Owner: thefrontside
- License: mit
- Created: 2018-11-02T19:56:47.000Z (over 6 years ago)
- Default Branch: v3
- Last Pushed: 2025-04-03T22:39:39.000Z (about 1 month ago)
- Last Synced: 2025-04-07T06:36:51.718Z (about 1 month ago)
- Topics: algebraic-effects, async-await, concurrency, effects, effects-management, structured-concurrency, task-runner
- Language: TypeScript
- Homepage: https://frontside.com/effection
- Size: 11.9 MB
- Stars: 681
- Watchers: 16
- Forks: 32
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/effection)
[](https://bundlephobia.com/result?p=effection)
[](https://opensource.org/licenses/MIT)
[](https://frontside.com)
[](https://discord.gg/Ug5nWH8)# Effection
Structured concurrency and effects for JavaScript.
## Why use Effection?
Effection leverages the idea of [structured concurrency][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](https://frontside.com/effection)
## Platforms
Effection runs on all major JavaScript platforms including NodeJs, Browser, and
Deno. It is published on both [npm][npm-effection] and [deno.land][deno-land-effection].## Contributing to Website
Go to [website's readme](www) to learn how to contribute to the website.
## Development
[Deno][] is the primary tool used for development, testing, and packaging.
### Testing
To run tests:
```text
$ 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:``` text
$ 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.
[structured concurrency]: https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
[discord]: https://discord.gg/Ug5nWH8
[Deno]: https://deno.land
[npm-effection]: https://www.npmjs.com/package/effection
[deno-land-effection]: https://deno.land/x/effection