Fizzy UI utils
UI utility & helper functions
Used in Flickity, Isotope, Masonry, Draggabilly
Install
npm: npm install fizzy-ui-utils
Yarn: yarn add fizzy-ui-utils
API
const utils = window.fizzyUIUtils;
const utils = require('fizzy-ui-utils');
import utils from 'fizzy-ui-utils';
utils.makeArray( obj )
utils.modulo( num, div )
utils.removeFrom( ary, obj )
utils.getQueryElement( elem )
MyClass.prototype.handleEvent = utils.handleEvent;
utils.filterFindElements( elems, selector )
utils.debounceMethod( MyClass, methodName, threhold )
utils.docReady( callback )
utils.toDashed( str )
utils.htmlInit( MyClass, namespace )
Legacy API The following methods were available in v2, and still available in v3, but should be avoided in favor of native browser API
utils.extend( a, b )
utils.getParent( elem, selector )
Browser support
Fizzy UI utils uses ES2018 features like spread operators and arrow functions. As such its browser support is: Chrome 46+, Firefox 34+, Safari 10+, and Edge 12+.
For older browser support, including IE10 and Android 4, try v2.
MIT license. Have at it.
By Metafizzy 🌈🐻