@sha1n/about-time 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/index.js +2 -1
- package/dist/types/index.d.ts +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
A collection of essential time related utilities.
|
|
11
11
|
|
|
12
12
|
- [About-Time](#about-time)
|
|
13
|
-
|
|
13
|
+
- [Install](#install)
|
|
14
|
+
- [Utilities & Features](#utilities--features)
|
|
14
15
|
- [Delay](#delay)
|
|
15
16
|
- [WithTimeout](#withtimeout)
|
|
16
17
|
- [Sleep](#sleep)
|
|
@@ -25,11 +26,12 @@ A collection of essential time related utilities.
|
|
|
25
26
|
- [Retriable](#retriable)
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
# Install
|
|
29
30
|
```bash
|
|
30
31
|
npm i @sha1n/about-time
|
|
31
32
|
```
|
|
32
33
|
|
|
34
|
+
# Utilities & Features
|
|
33
35
|
## Delay
|
|
34
36
|
```ts
|
|
35
37
|
// Execute a function with delay and return it's value
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.exponentialBackoffRetryPolicy = exports.simpleRetryPolicy = exports.fixedRetryPolicy = exports.retriable = exports.retryAround = exports.eventually = exports.until = exports.stopwatch = exports.delay = exports.sleep = exports.toMilliseconds = exports.TimeUnit = void 0;
|
|
3
|
+
exports.exponentialBackoffRetryPolicy = exports.simpleRetryPolicy = exports.fixedRetryPolicy = exports.retriable = exports.retryAround = exports.eventually = exports.until = exports.stopwatch = exports.delay = exports.sleep = exports.withTimeout = exports.toMilliseconds = exports.TimeUnit = void 0;
|
|
4
4
|
var timeunit_1 = require("./lib/timeunit");
|
|
5
5
|
Object.defineProperty(exports, "TimeUnit", { enumerable: true, get: function () { return timeunit_1.TimeUnit; } });
|
|
6
6
|
Object.defineProperty(exports, "toMilliseconds", { enumerable: true, get: function () { return timeunit_1.toMilliseconds; } });
|
|
7
7
|
var utilities_1 = require("./lib/utilities");
|
|
8
|
+
Object.defineProperty(exports, "withTimeout", { enumerable: true, get: function () { return utilities_1.withTimeout; } });
|
|
8
9
|
Object.defineProperty(exports, "sleep", { enumerable: true, get: function () { return utilities_1.sleep; } });
|
|
9
10
|
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return utilities_1.delay; } });
|
|
10
11
|
Object.defineProperty(exports, "stopwatch", { enumerable: true, get: function () { return utilities_1.stopwatch; } });
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { TimeUnit, toMilliseconds } from './lib/timeunit';
|
|
2
|
-
export { sleep, delay, stopwatch, until, eventually } from './lib/utilities';
|
|
2
|
+
export { withTimeout, sleep, delay, stopwatch, until, eventually } from './lib/utilities';
|
|
3
3
|
export { RetryPolicy, retryAround, retriable, fixedRetryPolicy, simpleRetryPolicy, exponentialBackoffRetryPolicy } from './lib/retry';
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { TimeUnit, toMilliseconds } from './lib/timeunit';
|
|
2
|
-
export { sleep, delay, stopwatch, until, eventually } from './lib/utilities';
|
|
2
|
+
export { withTimeout, sleep, delay, stopwatch, until, eventually } from './lib/utilities';
|
|
3
3
|
export {
|
|
4
4
|
RetryPolicy,
|
|
5
5
|
retryAround,
|