Socket
Socket
Sign inDemoInstall

effection

Package Overview
Dependencies
Maintainers
1
Versions
299
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

effection

Effortlessly composable structured concurrency primitive for JavaScript


Version published
Weekly downloads
3.7K
decreased by-4.73%
Maintainers
1
Weekly downloads
 
Created
Source

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

Effection

A framework for Node and the browser that makes building concurrent systems easy to get right.

Why use Effection?

Using Effection provides many benefits over using plain Promises and async/await code:

  • Cleanup: Effection code cleans up after itself, and that means never having to remember to manually close a resource or detach a listener.
  • Cancellation: Any Effection task can be cancelled, which will completely stop that task, as well as stopping any other tasks this operation itself has started.
  • Synchronicity: Unlike Promises and async/await, Effection is fundamentally synchronous in nature, this means you have full control over the event loop and operations requiring synchronous setup remain race condition free.
  • Composition: Since all Effection code is well behaved, it composes easily, and there are no nasty surprises when trying to fit different pieces together.

Effection leverages the idea of structured concurrency to ensure that you don't leak any resources, and that cancellation is properly handled. It helps you build concurrent code that feels rock solid and behaves well under all failure conditions. In essence, Effection allows you to compose concurrent code so that you can reason about its behavior.

Learn how to use Effection in your own project

Contributing

Currently, Effection development happens using yarn. While npm may work, it is not tested so your mileage may vary.

To build, run the prepack command from the root directory.

$ yarn prepack

You can also run the prepack command within each sub directory to only build that package.

Testing

To run tests:

$ yarn test

Most test suites use the @effection/mocha to leverage Effection to test itself.

FAQs

Package last updated on 22 Aug 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc