@bscotch/utility
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -5,2 +5,3 @@ /** Get a promise that resolves in some number of milliseconds. */ | ||
export declare function resolveInSeconds(seconds: number): Promise<unknown>; | ||
export declare function resolveInNextTick(): Promise<unknown>; | ||
//# sourceMappingURL=wait.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveInSeconds = exports.resolveInMillis = void 0; | ||
exports.resolveInNextTick = exports.resolveInSeconds = exports.resolveInMillis = void 0; | ||
const process_1 = require("process"); | ||
/** Get a promise that resolves in some number of milliseconds. */ | ||
@@ -14,2 +15,6 @@ function resolveInMillis(millis) { | ||
exports.resolveInSeconds = resolveInSeconds; | ||
function resolveInNextTick() { | ||
return new Promise(res => process_1.nextTick(res)); | ||
} | ||
exports.resolveInNextTick = resolveInNextTick; | ||
//# sourceMappingURL=wait.js.map |
@@ -0,1 +1,10 @@ | ||
# [0.7.0](https://github.com/bscotch/node-util/compare/v0.6.0...v0.7.0) (2020-11-11) | ||
### Features | ||
* Can now get a promise that resolves after one tick. ([157e280](https://github.com/bscotch/node-util/commit/157e280960ebe11546d27847b36dec15e72f8a7a)) | ||
# [0.6.0](https://github.com/bscotch/node-util/compare/v0.5.2...v0.6.0) (2020-11-11) | ||
@@ -2,0 +11,0 @@ |
{ | ||
"name": "@bscotch/utility", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Bscotch Utilities: Methods for common Node.js needs.", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -133,2 +133,3 @@ # Bscotch Utilities | ||
resolveInSeconds, | ||
resolveInNextTick, | ||
} from '@bscotch/utility'; | ||
@@ -141,3 +142,5 @@ | ||
await resolveInSeconds(1); | ||
// Wait until next tick | ||
await resolveInNextTick(); | ||
} | ||
``` |
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
28251
303
145