UNPKG

@toreda/time

Version:

Simple, small footprint library for common time operations and converting between units of time.

17 lines (16 loc) 380 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mutable = mutable; function mutable(initial) { let current = initial; function fn(value) { if (value !== undefined && value !== null) { current = value; } return current; } fn.reset = () => { current = initial; }; return fn; }