@eyalsh/async_channels
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc8 • Public • Published

Async Channels

Latest Version Test & Release codecov nodejs minimum version License: GPL v3

Channels are queue-like objects (First In First Out) that their enqueue (send) and dequeue (get) functions are asynchronous (async). By passing them between asynchronous functions we can synchronize operations between said functions.

Setup

NodeJS

Released under both npmjs & github packages:

npmjs.com:@eyalsh/async_channels github.com:@Eyal-Shalev/async_channels

Install:

npm
npm install @eyalsh/async_channels
yarn
yarn add @eyal-shalev/async_channels

import (ES Modules):

import { Channel } from "@eyalsh/async_channels";

require (CommonJS):

const { Channel } = require("@eyalsh/async_channels");

Deno

The library is available to import from deno.land/x/async_channels

import { Channel } from "https://deno.land/x/async_channels/mod.ts";

Browser - CDN / Download

You can import the library from any CDN that mirrors npmjs.com, such as skypack.dev or unpkg.com.

import { Channel } from "https://cdn.skypack.dev/@eyalsh/async_channels";

Or you can download compiled library from GitHub:

  • Latest Release
  • All Releases
import { Channel } from "/path/to/async_channels.esm.js";

Note: an IIFE version also exist, if your application doesn't support ES modules.

<script src="/path/to/async_channels.iife.js"></script>
<script>
  const {Channel} = async_channels;
</script>

Examples

Package Sidebar

Install

npm i @eyalsh/async_channels

Weekly Downloads

57

Version

1.0.0-rc8

License

GPL-3.0-or-later

Unpacked Size

189 kB

Total Files

50

Last publish

Collaborators

  • eyalsh