dmj-frist-test
v0.1.4
Published
测试库
Readme
Installation
npm install --save-dev dmj-frist-test
Usage
import Pencil from 'dmj-frist-test'
Function 函数的用途及使用方法
query(name, querystring)
- Function for gets the value of the specified name in the specified querystring
serialize(data)
- Function for turn the object into a url string
$(selector)
- Function for simulating jQuery
removeNode(node)
- Function for Deleting DOM node
insertAfter(node)
- Function for inserting the node node after the target node
addClass(node, className)
- Function for add class name
removeClass(node, className)
- Function for remove class name
getAbsoluteUrl(url)
- Function for get absolute url
debounce(callback, time)
- Function for avoiding shake
removeItemByIndex(index, arr)
- Function for remove item by index(如果arr不是数组将返回arr,如果index大于数组的长度或者小于0返回null, 如果index不是数组的话将返回undefined)
forEach(item, callBack)
- jest mock
