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

named-promise-task

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

named-promise-task - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

6

dist/index.cjs.js

@@ -27,4 +27,4 @@ 'use strict';

/**
* A Named Promise Task
* Insipre from https://stackoverflow.com/questions/53540348/js-async-await-tasks-queue
* A Named Promise Task
* Inspire from https://stackoverflow.com/questions/53540348/js-async-await-tasks-queue
*/

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

return _context.abrupt("return", (_this$_namedWorkers$n = _this._namedWorkers[name]).call.apply(_this$_namedWorkers$n, [_this._context].concat(values))["finally"](function () {
return _context.abrupt("return", Promise.resolve((_this$_namedWorkers$n = _this._namedWorkers[name]).call.apply(_this$_namedWorkers$n, [_this._context].concat(values)))["finally"](function () {
_this._size--;

@@ -74,0 +74,0 @@

@@ -17,4 +17,4 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";

/**
* A Named Promise Task
* Insipre from https://stackoverflow.com/questions/53540348/js-async-await-tasks-queue
* A Named Promise Task
* Inspire from https://stackoverflow.com/questions/53540348/js-async-await-tasks-queue
*/

@@ -60,3 +60,3 @@

return _context.abrupt("return", (_this$_namedWorkers$n = _this._namedWorkers[name]).call.apply(_this$_namedWorkers$n, [_this._context].concat(values))["finally"](function () {
return _context.abrupt("return", Promise.resolve((_this$_namedWorkers$n = _this._namedWorkers[name]).call.apply(_this$_namedWorkers$n, [_this._context].concat(values)))["finally"](function () {
_this._size--;

@@ -63,0 +63,0 @@

{
"name": "named-promise-task",
"version": "1.1.0",
"version": "1.2.0",
"description": "No Queue, Just a simple promise mechanics to help you run serial tasks.",

@@ -8,3 +8,3 @@ "main": "dist/index.cjs.js",

"scripts": {
"lint": "standard --parser=babel-eslint --fix",
"lint": "standard --parser=babel-eslint --fix src",
"build": "rollup -c",

@@ -30,2 +30,3 @@ "dev": "rollup -c -w"

"babel-eslint": "^10.1.0",
"core-js": "^3.6.5",
"eslint": "^7.5.0",

@@ -37,3 +38,6 @@ "rollup": "^2.23.0",

"dist/**"
]
],
"engines": {
"node": ">= 10.0.0"
}
}
# A Named Promise Task
Insipre from https://stackoverflow.com/a/53540586/314173
Inspire from https://stackoverflow.com/a/53540586/314173
No Queue, Just a simple promise mechanics to help you run serial tasks.
When you need a Javascript task manager, but no want callback like [async.serrial](http://caolan.github.io/async/v3/)
When you need a Javascript task manager, but no want callback like [async.queue](https://caolan.github.io/async/v3/docs.html#queue)

@@ -16,4 +16,4 @@ This package support named tasks, Please read example.js.

Need platform supoort [Promise.finally](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/finally)
## Usage

@@ -46,7 +46,7 @@

```
then: the tasks's result
then: the task's result
```
```
catch: a exception from task
catch: an exception from task
```

@@ -53,0 +53,0 @@

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