Adamjs
一些实用工具函数封装库
Installation
You can install with npm:
npm install adam-noah
also yarn:
yarn add adam-noah
Usage
Function
query(name, querystring)
Function for gets the value of the specified name in the specified querystring
Adam //return 'js'
serialize(data)
Function for turn the object into a url string
Adam //return '?hello=js'
$(selector)
Function for simulating jQuery
adam //return {DOM|undefined}
removeNode(node)
Function for Deleting DOM node
adam //return {DOM}
insertAfter(node)
Function for inserting the node node after the target node
Adam //return true or false
addClass(node, className)
Function for add class name
Adam //return true or false
removeClass(node, className)
Function for remove class name
adam //return true or false
getAbsoluteUrl(url)
Function for get absolute url
Adam //return 'https://github.com/hhh'
debounce(callback, time)
Function for avoiding shake
Example:
removeItemByIndex(index, arr)
Function for remove item by index
adam //return [1, 3]