UNPKG

@event-calendar/core

Version:

Full-sized drag & drop event calendar with resource & timeline views

80 lines (60 loc) 1.46 kB
export function assign(...args) { return Object.assign(...args); } export function keys(object) { return Object.keys(object); } export function entries(object) { return Object.entries(object); } export function hasOwn(object, property) { return Object.hasOwn(object, property); } export function floor(value) { return Math.floor(value); } export function ceil(value) { return Math.ceil(value); } export function min(...args) { return Math.min(...args); } export function max(...args) { return Math.max(...args); } export function symbol() { return Symbol('ec'); } export function length(array) { return array.length; } export function empty(array) { return !length(array); } export function isArray(value) { return Array.isArray(value); } export function isFunction(value) { return typeof value === 'function'; } export function isPlainObject(value) { if (typeof value !== 'object' || value === null) { return false; } const prototype = Object.getPrototypeOf(value); return prototype === null || prototype === Object.prototype; } export function isDate(value) { return value instanceof Date; } export function run(fn) { return fn(); } export function runAll(fns) { fns.forEach(run); } export function noop() {} export const identity = (x) => x; export function isRtl() { return window.getComputedStyle(document.documentElement).direction === 'rtl'; }