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

asynciterator-promiseproxy

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asynciterator-promiseproxy - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./lib/PromiseProxyIterator"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const asynciterator_1 = require("asynciterator");
var tslib_1 = require("tslib");
var asynciterator_1 = require("asynciterator");
/**

@@ -10,15 +11,19 @@ * A {@link TransformIterator} that allows the source to be set through a lazy Promise.

*/
class PromiseProxyIterator extends asynciterator_1.TransformIterator {
constructor(sourceGetter) {
super();
this.sourceGetter = sourceGetter;
var PromiseProxyIterator = /** @class */ (function (_super) {
tslib_1.__extends(PromiseProxyIterator, _super);
function PromiseProxyIterator(sourceGetter) {
var _this = _super.call(this) || this;
_this.sourceGetter = sourceGetter;
return _this;
}
_begin(done) {
this.sourceGetter().then((source) => {
this.source = source;
PromiseProxyIterator.prototype._begin = function (done) {
var _this = this;
this.sourceGetter().then(function (source) {
_this.source = source;
done();
}).catch((error) => this.emit('error', error));
}
}
}).catch(function (error) { return _this.emit('error', error); });
};
return PromiseProxyIterator;
}(asynciterator_1.TransformIterator));
exports.PromiseProxyIterator = PromiseProxyIterator;
//# sourceMappingURL=PromiseProxyIterator.js.map
{
"name": "asynciterator-promiseproxy",
"version": "1.0.2",
"version": "1.0.3",
"description": "An AsyncIterator proxy that allows its source to be set via a promise.",

@@ -5,0 +5,0 @@ "main": "index.js",

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