UNPKG

@dvcol/common-utils

Version:

Typescript library for common utility functions and constants

34 lines (33 loc) 3.84 kB
export { CacheStore, CacheStoreEntity } from './models/cache.model.js'; export { ErrorTypes, ParsingError, ParsingRelativePathError } from './models/error.model.js'; export { Observer, UpdateFunction, Updater } from './models/observable.model.js'; export { ExtractPathParams, ExtractStrictPathParams, ParamValue } from './models/parameters.model.js'; export { ArrayElement, DeepPrettify, ExclusiveUnion, GenericFunction, Mutable, Prettify, Primitive, PrimitiveRecord, RecursivePartial, RecursiveRecord, RecursiveType, RequireAtLeastOne, SyncOrAsync } from './models/typescript.model.js'; export { uniqueArray } from './utils/array.utils.js'; export { isIOS, isIPad, isIPhone, isMac, isMobileFirefox, isSafari, testPlatform } from './utils/browser.utils.js'; export { CacheRetention } from './utils/cache.utils.js'; export { Values, toClass, toStyle } from './utils/class.utils.js'; export { RGBColor, hexToRgb, rgbToHex } from './utils/color.utils.js'; export { nullSafeCompare, numberCompare, stringCompare } from './utils/compare.utils.js'; export { PKCECodeGenerator, getCodeChallenge, getCodeVerifier, randomHex, verifyCodeChallenge } from './utils/crypto.utils.js'; export { getCursorState } from './utils/cursor.utils.js'; export { DateUtils, DayOfWeek, DayOfWeekToNumber, NumberToDayOfWeek, TimeSinceResult, TimeSinceUnit, compareDateObject, dayOfTheWeek, elapsedTime, getTodayISOLocal, shortTime, timeAgo, timeSince, toDateObject } from './utils/date.utils.js'; export { DebouncedFunction, debounce, useDebounce } from './utils/debounce.utils.js'; export { clickableSelector, clickableTags, closestClickableElement, focusableElementSelectors, getClickableAncestor, getFocusableElement, getFocusableElements, getLastFocusableElement, isClickable, tabFocusableElementSelectors } from './utils/element.utils.js'; export { downloadJson } from './utils/download.utils.js'; export { InSeconds, Time, computeProgress, formatBytes, formatDHMS, formatHMS, formatTime, formatTimeLong, formatTimeShort, formatYMD } from './utils/format.utils.js'; export { getIntl, getIntlLanguage, getIntlLocale, getIntlRegion, getNavigatorLanguage, getNavigatorRegion } from './utils/intl.utils.js'; export { ConsoleFormat, LogLevel, LoggerColor, ProxyLogger, ProxyLoggerFilter, TimeStampFormat, TimeStampFormats, colorize, getTimestamp, proxyLoggerFilter, toLogLevel } from './utils/logger.utils.js'; export { arrayMax, clamp, findClosestMatch, percent, randomInt, round } from './utils/math.utils.js'; export { LockedElement, ScrollContainer, UseMobileScrollLock, useMobileScrollLock } from './utils/mobile.utils.js'; export { getNavigatorVersion, getShortLocale, isMacOs } from './utils/navigator.utils.js'; export { isShallowEqual, shallowClone } from './utils/object.utils.js'; export { Observable, ObservableState } from './utils/observable.utils.js'; export { raceUntil, wait } from './utils/promise.utils.js'; export { FilePickerOptions, JsonWriterOptions, SaveFilePickerOptions, defaultFileHandlerOptions, getJsonWriter, getNewFileHandle, writeJson } from './utils/save.utils.js'; export { MarkAndToken, MarkTokenizer, MarkTokenizerOptions, buildFormData, capitalizeEachWord, computeAbsolutePath, deCapitalise, getUUID, markTokenizer, parseJSON, sentenceCase, stringifyKeys, stringifyParams, toCase, toKebabCase, toPathSegment, toSnakeCase, versionCheck } from './utils/string.utils.js'; export { addCustomProperty, zIndex, zIndexMax } from './utils/style.utils.js'; export { Position, ScrollState, SwipeDirection, SwipeDirections, SwipeTolerances, TouchState, handleSwipe, handleSwipeLeftRight, handleSwipeUpDown } from './utils/touch.utils.js'; export { autoImplement, staticImplements } from './utils/typescript.utils.js'; export { isDarkTheme, isLightTheme, watchDarkThemeDisposable, watchTheme } from './utils/window.utils.js'; import 'uuid';