Comparing version 1.0.1 to 1.0.2
export * from './sleep'; | ||
export * from './defer'; | ||
export * from './queue'; | ||
export * from './asap'; |
export * from './sleep'; | ||
export * from './defer'; | ||
export * from './queue'; | ||
export * from './asap'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "pjobs", | ||
"description": "A simple and efficient queue job executor using promises. And some promise's utilities.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"private": false, | ||
@@ -22,3 +22,3 @@ "main": "dist/index.js", | ||
"buildWithTSC": "tsc -p ./tsconfig.build.json", | ||
"prepublish2": "yarn test && yarn buildWithTSC", | ||
"prepublishOnly": "yarn test && yarn buildWithTSC", | ||
"test": "jest --config ../jest.config.js .", | ||
@@ -25,0 +25,0 @@ "clean": "monoclean clean" |
@@ -60,2 +60,10 @@ [![Node.js CI](https://github.com/teintinu/pjobs/actions/workflows/test.yml/badge.svg)](https://github.com/teintinu/pjobs/actions/workflows/test.yml) | ||
await sleep(100) // pause execution flow for 100 miliseconds | ||
``` | ||
## `asap` | ||
delay execution of a function to as soon as possible | ||
```typescript | ||
import { asap } from 'pjobs' | ||
asap(()=>console.log('b')) // 'b' will be logged after 'a' | ||
console.log('a') | ||
``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7850
176
68
0