Files
yogibook_aury_new/public/assets/libs/flatpickr/esm/utils/index.js
T
2025-09-01 15:06:58 +02:00

11 lines
371 B
JavaScript

export const pad = (number, length = 2) => `000${number}`.slice(length * -1);
export const int = (bool) => (bool === true ? 1 : 0);
export function debounce(fn, wait) {
let t;
return function () {
clearTimeout(t);
t = setTimeout(() => fn.apply(this, arguments), wait);
};
}
export const arrayify = (obj) => obj instanceof Array ? obj : [obj];