named-promise-task
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -25,3 +25,7 @@ 'use strict'; | ||
var events = require('events'); | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
var eventemitter3 = require('eventemitter3'); | ||
/** | ||
@@ -33,4 +37,4 @@ * A Named Promise Task | ||
var PromiseTask = /*#__PURE__*/function (_events$EventEmitter) { | ||
_inherits(PromiseTask, _events$EventEmitter); | ||
var PromiseTask = /*#__PURE__*/function (_eventemitter3$EventE) { | ||
_inherits(PromiseTask, _eventemitter3$EventE); | ||
@@ -67,2 +71,3 @@ var _super = _createSuper(PromiseTask); | ||
_context.prev = 3; | ||
_this._name = name; | ||
@@ -77,2 +82,4 @@ for (_len = _args.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
if (_this._size === 0) { | ||
_this._name = null; | ||
_this.emit('stop'); | ||
@@ -82,3 +89,3 @@ } | ||
case 7: | ||
case 8: | ||
case "end": | ||
@@ -88,3 +95,3 @@ return _context.stop(); | ||
} | ||
}, _callee, null, [[0,, 3, 7]]); | ||
}, _callee, null, [[0,, 3, 8]]); | ||
})); | ||
@@ -102,2 +109,4 @@ | ||
if (_this._size === 1) { | ||
_this._name = name; | ||
_this.emit('start'); | ||
@@ -118,2 +127,3 @@ } | ||
_this._size = 0; | ||
_this._name = null; | ||
return _this; | ||
@@ -133,2 +143,8 @@ } // task queue size | ||
return this._size !== 0; | ||
} // current task name | ||
}, { | ||
key: "currentTaskName", | ||
get: function get() { | ||
return this._name; | ||
} // task executor | ||
@@ -139,5 +155,5 @@ | ||
return PromiseTask; | ||
}(events.EventEmitter); | ||
}(eventemitter3.EventEmitter); | ||
module.exports = PromiseTask; | ||
exports.PromiseTask = PromiseTask; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -15,3 +15,3 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator"; | ||
import { EventEmitter } from 'events'; | ||
import { EventEmitter } from 'eventemitter3'; | ||
/** | ||
@@ -55,2 +55,3 @@ * A Named Promise Task | ||
_context.prev = 3; | ||
_this._name = name; | ||
@@ -65,2 +66,4 @@ for (_len = _args.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
if (_this._size === 0) { | ||
_this._name = null; | ||
_this.emit('stop'); | ||
@@ -70,3 +73,3 @@ } | ||
case 7: | ||
case 8: | ||
case "end": | ||
@@ -76,3 +79,3 @@ return _context.stop(); | ||
} | ||
}, _callee, null, [[0,, 3, 7]]); | ||
}, _callee, null, [[0,, 3, 8]]); | ||
})); | ||
@@ -90,2 +93,4 @@ | ||
if (_this._size === 1) { | ||
_this._name = name; | ||
_this.emit('start'); | ||
@@ -106,2 +111,3 @@ } | ||
_this._size = 0; | ||
_this._name = null; | ||
return _this; | ||
@@ -121,2 +127,8 @@ } // task queue size | ||
return this._size !== 0; | ||
} // current task name | ||
}, { | ||
key: "currentTaskName", | ||
get: function get() { | ||
return this._name; | ||
} // task executor | ||
@@ -129,3 +141,3 @@ | ||
export { PromiseTask as default }; | ||
export { PromiseTask }; | ||
//# sourceMappingURL=index.esm.js.map |
{ | ||
"name": "named-promise-task", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "No Queue, Just a simple promise mechanics to help you run serial tasks.", | ||
@@ -14,3 +14,5 @@ "main": "dist/index.cjs.js", | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"dependencies": { | ||
"eventemitter3": "^4.0.7" | ||
}, | ||
"devDependencies": { | ||
@@ -17,0 +19,0 @@ "@babel/cli": "^7.10.5", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19973
212
1
+ Addedeventemitter3@^4.0.7
+ Addedeventemitter3@4.0.7(transitive)