@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
12 lines (11 loc) • 359 B
JavaScript
/**
* Resolve an optional overflow value to its default ("constrain") when unset.
*
* @param overflow optional overflow value
* @example resolveOverflow(undefined) // "constrain"
* @example resolveOverflow("reject") // "reject"
* @returns the resolved overflow value
*/
export function resolveOverflow(overflow) {
return overflow ?? "constrain";
}