@gunawanwijaya/utils
v1.1.0
Published
Collection of native progressive (es6) utility library
Readme
upils
Collection of native progressive (es6) utility library
all-platform
is- type checking (Boolean)merge- object deep mergeobjectToQueryString- QueryString builderqueryStringToObject- QueryString parserval- get native value from string
browser only
- DOM specific
allDOM- selector of many DOM (Array)oneDOM- selector of only one DOMremoveDOM- remove only one DOM, can be joined witheachDOMeachDOM- iterate many DOM with callbackwrapDOM- wrap only one DOM with a new DOMxmlToObject- parse xml to Object, useful for reading xml like format, e.g. rss feed (modified from https://github.com/metatribal/xmlToJSON)stringToDOM- make a DOM from string
- DOM class specific
hasClass- check if a DOM has a className, can be joined witheachDOMaddClass- add className to all of DOM within the queryremoveClass- remove className to all of DOM within the querytoggleClass- toggle className to all of DOM within the query
- event specific
on- addEventListener with passive event as default, non passive addfalseafter callbackoff- removeEventListener
- injection
insertScript- script injection (JSONP like)insertStyle- style injection
