Socket
Socket
Sign inDemoInstall

@blackglory/structures

Package Overview
Dependencies
23
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.14.1 to 0.14.2

14

lib/async-generator-emitter.js

@@ -1,2 +0,2 @@

import { go } from '@blackglory/go';
import { go, goAsyncGenerator } from '@blackglory/go';
export class AsyncGeneratorEmitter {

@@ -32,3 +32,3 @@ constructor() {

async function* handler(...args) {
yield* run(() => listener(...args));
yield* goAsyncGenerator(() => listener(...args));
}

@@ -38,3 +38,3 @@ }

const removeListener = this.on(event, async function* (...args) {
yield* run(() => listener(...args));
yield* goAsyncGenerator(() => listener(...args));
removeListener();

@@ -48,3 +48,3 @@ });

for (const listener of listeners) {
yield* run(() => listener(...args));
yield* goAsyncGenerator(() => listener(...args));
}

@@ -58,8 +58,2 @@ }

}
async function* run(fn) {
const generator = fn();
if (generator) {
yield* generator;
}
}
//# sourceMappingURL=async-generator-emitter.js.map

@@ -1,2 +0,2 @@

import { go } from '@blackglory/go';
import { go, goGenerator } from '@blackglory/go';
export class GeneratorEmitter {

@@ -32,3 +32,3 @@ constructor() {

function* handler(...args) {
yield* run(() => listener(...args));
yield* goGenerator(() => listener(...args));
}

@@ -38,3 +38,3 @@ }

const removeListener = this.on(event, function* (...args) {
yield* run(() => listener(...args));
yield* goGenerator(() => listener(...args));
removeListener();

@@ -48,3 +48,3 @@ });

for (const listener of listeners) {
yield* run(() => listener(...args));
yield* goGenerator(() => listener(...args));
}

@@ -58,8 +58,2 @@ }

}
function* run(fn) {
const generator = fn();
if (generator) {
yield* generator;
}
}
//# sourceMappingURL=generator-emitter.js.map
{
"name": "@blackglory/structures",
"version": "0.14.1",
"version": "0.14.2",
"description": "",

@@ -68,3 +68,3 @@ "files": [

"@blackglory/errors": "^3.0.3",
"@blackglory/go": "^1.1.3",
"@blackglory/go": "^2.0.0",
"extra-timers": "^0.2.6",

@@ -71,0 +71,0 @@ "extra-utils": "^5.6.0",

@@ -1,2 +0,2 @@

import { go } from '@blackglory/go'
import { go, goAsyncGenerator } from '@blackglory/go'

@@ -57,3 +57,3 @@ type Listener<Args extends unknown[], Yield, Next> = (...args: Args) =>

): AsyncGenerator<Yield, void, Next> {
yield* run(() => listener(...args))
yield* goAsyncGenerator(() => listener(...args))
}

@@ -71,3 +71,3 @@ }

): AsyncGenerator<Yield, void, Next> {
yield* run(() => listener(...args))
yield* goAsyncGenerator(() => listener(...args))
removeListener()

@@ -88,3 +88,3 @@ }

for (const listener of listeners) {
yield* run(() => listener(...args))
yield* goAsyncGenerator(() => listener(...args))
}

@@ -98,10 +98,1 @@ }

}
async function* run<Yield, Next>(
fn: () => void | Generator<Yield, void, Next> | AsyncGenerator<Yield, void, Next>
): AsyncGenerator<Yield, void, Next> {
const generator = fn()
if (generator) {
yield* generator
}
}

@@ -1,2 +0,2 @@

import { go } from '@blackglory/go'
import { go, goGenerator } from '@blackglory/go'

@@ -56,3 +56,3 @@ type Listener<Args extends unknown[], Yield, Next> = (...args: Args) =>

): Generator<Yield, void, Next> {
yield* run(() => listener(...args))
yield* goGenerator(() => listener(...args))
}

@@ -70,3 +70,3 @@ }

): Generator<Yield, void, Next> {
yield* run(() => listener(...args))
yield* goGenerator(() => listener(...args))
removeListener()

@@ -87,3 +87,3 @@ }

for (const listener of listeners) {
yield* run(() => listener(...args))
yield* goGenerator(() => listener(...args))
}

@@ -97,10 +97,1 @@ }

}
function* run<Yield, Next>(
fn: () => void | Generator<Yield, void, Next>
): Generator<Yield, void, Next> {
const generator = fn()
if (generator) {
yield* generator
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc