Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azothjs/channels

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azothjs/channels - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

1

branch.js
import { Multicast } from './Multicast.js';
import { AsyncTypeError } from './throw.js';
import { channel } from './channel.js';
import { Sync } from '../maya/compose/compose.js';

@@ -6,0 +5,0 @@ export function branch(async, ...transforms) {

2

channel.js
import { Sync } from '../maya/compose/compose.js';
import { resolveArgs } from './resolve-args.js';
import { AsyncTypeError, InitOptionWithSyncWrappedAsyncProviderError, OptionMissingFunctionArgumentError } from './throw.js';
import { AsyncTypeError, InitOptionWithSyncWrappedAsyncProviderError } from './throw.js';

@@ -5,0 +5,0 @@ export function channel(async, transformArg, options) {

import { Sync } from '../maya/compose/compose.js';
import { generator } from './generator.js';
import { observe } from './unicast.js';
export class Multicast {
#consumers = [];
#async = null;
#started = false;
#initial;
#iter = null;
constructor(async) {
if(async instanceof Sync) {
const { initial, input } = async;
this.#async = input;
this.#initial = initial;
}
else {
this.#async = async;
}
constructor(iter) {
this.#iter = (iter instanceof Sync) ? iter.input : iter;
this.start();

@@ -24,6 +14,5 @@ }

async start() {
const async = this.#async;
this.#started = true;
for await(let value of async) {
for(let consumer of this.#consumers) {
const iter = this.#iter;
for await(const value of iter) {
for(const consumer of this.#consumers) {
consumer(value);

@@ -34,6 +23,2 @@ }

channel(transform, options) {
}
subscriber(transform, options) {

@@ -40,0 +25,0 @@ const [iterator, next] = generator(transform, options);

{
"name": "@azothjs/channels",
"version": "0.3.4",
"version": "0.3.5",
"description": "Asynchronous layout channels",

@@ -5,0 +5,0 @@ "author": "Marty Nelson",

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