🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

fizzy-ui-utils

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fizzy-ui-utils

UI utilities

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
374K
1.7%
Maintainers
1
Weekly downloads
 
Created
Source

Fizzy UI utils

UI utility & helper functions

Used in Flickity, Isotope, Masonry, Draggabilly

Install

Bower: bower install fizzy-ui-utils --save

npm: npm install fizzy-ui-utils --save

Reference

// fizzyUIUtils is the browser global
var utils = fizzyUIUtils;

// ---- ---- //

utils.extend( a, b )
// extend object

utils.modulo( num, div )
// num [modulo] div

utils.isArray( obj )
// check if object is Array

utils.makeArray( obj )
// make array from object

utils.indexOf( ary, obj )
// get index of object in array

utils.removeFrom( obj, ary )
// remove object from array

utils.isElement( obj )
// check if object is an element

utils.setText( elem, text )
// set text of an element

utils.getParent( elem, selector )
// get parent element of an element, given a selector string

utils.getQueryElement( elem )
// if elem is a string, use it as a selector and return element

utils.filterFindElements( elems, selector )
// iterate through elems, filter and find all elements that match selector

utils.debounceMethod( Class, methodName, threhold )
// debounce a class method

utils.htmlInit( Class, namespace )
// on document ready, initialize Class on every element
// that matches js-namespace
// pass in JSON options from element's data-options-namespace attribute

MIT license. Have at it.

Keywords

ui

FAQs

Package last updated on 22 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts