@augment-vir/common
Advanced tools
Comparing version 30.1.0 to 30.2.0
@@ -1,2 +0,2 @@ | ||
import { convertDuration, DurationUnit } from '@date-vir/duration'; | ||
import { convertDuration } from '@date-vir/duration'; | ||
/** | ||
@@ -110,4 +110,4 @@ * Different types of debouncing for the {@link Debounce} class. | ||
this.nextCallTimestamp = | ||
now + convertDuration(this.debounceDuration, DurationUnit.Milliseconds).milliseconds; | ||
now + convertDuration(this.debounceDuration, { milliseconds: true }).milliseconds; | ||
} | ||
} |
import { check } from '@augment-vir/assert'; | ||
import { ensureError } from '@augment-vir/core'; | ||
import { convertDuration, DurationUnit } from '@date-vir/duration'; | ||
import { convertDuration } from '@date-vir/duration'; | ||
/** | ||
@@ -17,3 +17,3 @@ * An error thrown by {@link wrapPromiseInTimeout} when the timeout is reached. | ||
failureMessage, | ||
`Promised timed out after ${convertDuration(duration, DurationUnit.Milliseconds).milliseconds} ms.`, | ||
`Promised timed out after ${convertDuration(duration, { milliseconds: true }).milliseconds} ms.`, | ||
] | ||
@@ -34,3 +34,3 @@ .filter(check.isTruthy) | ||
export function wrapPromiseInTimeout(duration, originalPromise, failureMessage) { | ||
const milliseconds = convertDuration(duration, DurationUnit.Milliseconds).milliseconds; | ||
const milliseconds = convertDuration(duration, { milliseconds: true }).milliseconds; | ||
return new Promise(async (resolve, reject) => { | ||
@@ -37,0 +37,0 @@ const timeoutId = milliseconds === Infinity |
{ | ||
"name": "@augment-vir/common", | ||
"version": "30.1.0", | ||
"version": "30.2.0", | ||
"description": "A collection of augments, helpers types, functions, and classes for any JavaScript environment.", | ||
@@ -42,5 +42,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@augment-vir/assert": "^30.1.0", | ||
"@augment-vir/core": "^30.1.0", | ||
"@date-vir/duration": "^6.0.0", | ||
"@augment-vir/assert": "^30.2.0", | ||
"@augment-vir/core": "^30.2.0", | ||
"@date-vir/duration": "^6.0.1", | ||
"ansi-styles": "^6.2.1", | ||
@@ -47,0 +47,0 @@ "json5": "^2.2.3", |
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
229751
Updated@augment-vir/assert@^30.2.0
Updated@augment-vir/core@^30.2.0
Updated@date-vir/duration@^6.0.1