// Ensures a function is only called once.
export function once(fn) {
    let called = false;
    let result;
    return function (...args) {
        if (!called) {
            called = true;
            result = fn(...args);
        }
        return result;
    };
}
//# sourceMappingURL=once.js.map