ESL Utils
ESL Utils - is a module that contains a set of common utilities for working with DOM, BOM and other simple but handy things that are used by ESL components, but can also be used in client code.
All ESL Utils helpers are super simple and atomic, be sure that none of the utilities requires the whole library. Even if you use the whole utils module, it is still tiny.
-
-
Observable - small base class that implements observable pattern.
-
-
-
Debounce - debounce function decorator.
Debouncing is a pattern commonly used for rate limiting function calls with a timeout.
-
Delayed Task - common helper to plan task (function) to be executed with or without a timeout.
New task planning request cancels the previous task in a DelayedTask instance in case it has not happened yet.
-
Promise Utils - a set of Promise helpers.
Allows converting DOM Events, timeouts, pooling check, etc. to ES6 Promise or create a Deferred object that allows to resolve or reject related Promise.
-
RAF(Rendering callback) Utils - Request Animation Frame common helpers.
Includes RAF Decorator that postpones multiple function calls to a single one before rendering. Also includes
afterNextRender
deferring function. -
Throttle - throttling function decorator.
Throttling is a pattern that allows to limit function call to one execution per timeout.
-
-
-
Keys - keyboard keys constants.
-
RTL Utils - Utils to detect RTL and RTL-specific browsers behavior.
-
Scripts - script loading utility to limit and track loading.
-
Scroll - scroll locking methods.
Note: uses scroll.less styles.
-
CSSClass - is a utility to work with CSS classes. Supports JQuery-like enumeration, inversion syntax and locks.
-
DOM Traversing - a set of utils to find DOM elements or check their relations.
-
-
-
Device Detector - set of user agent based checks such as engine or device type.
-
-
-
Array - array utils (uniq, flat, wrap, etc.).
-
Format - string format utils.
-
Function - simple functions and types.
-
Memoize - memoization function decorator.
Memoization patten allows executing pure function once and then use the cached result.
-
Object - object common utils.
-
UID - unique identifier generation util.
-