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