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

pbkit

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pbkit - npm Package Compare versions

Comparing version 0.0.32 to 0.0.33

core/runtime/base64.d.ts

1

core/runtime/async/event-buffer.d.ts
export interface EventBuffer<T> {
push(value: T): void;
error(error: Error): void;
finish(): void;

@@ -4,0 +5,0 @@ drain(): AsyncGenerator<T>;

17

core/runtime/async/event-buffer.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEventBuffer = void 0;
const observer_1 = require("./observer");
function createEventBuffer(config) {
const queue = [];
let resolve = undefined;
let deferred;
let finished = false;

@@ -12,5 +13,5 @@ return {

throw new Error("can't push after finish");
if (resolve) {
resolve({ value, done: false });
resolve = undefined;
if (deferred) {
deferred.resolve({ value, done: false });
deferred = undefined;
}

@@ -21,4 +22,8 @@ else {

},
error(error) {
deferred === null || deferred === void 0 ? void 0 : deferred.reject(error);
finished = true;
},
finish() {
resolve && resolve({ value: undefined, done: true });
deferred === null || deferred === void 0 ? void 0 : deferred.resolve({ value: undefined, done: true });
finished = true;

@@ -43,3 +48,3 @@ },

else {
return new Promise((r) => (resolve = r));
return deferred = (0, observer_1.defer)();
}

@@ -46,0 +51,0 @@ }

{
"name": "pbkit",
"version": "0.0.32",
"version": "0.0.33",
"author": "JongChan Choi <jong@chan.moe>",

@@ -5,0 +5,0 @@ "license": "(MIT OR Apache-2.0)",

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc