Library containing ES6-based DOM control and utility methods.
import $ from '@/assist';
$('#app')
$('#app').append(childNode)
$('#app').prepend(childNode)
$('#app').insertAfter(node)
$('#app').insertBefore(node)
$('#app').data('parent-id')
$('#app').data('parent-id', 1);
$('.test-list').first();
$('.test-list').last();
$('.a').next();
$('.b').prev();
$('.test-list').find('.e');
$('#button').on('click, mouseover, mouseleave', _ => {}, false)
$('#button').off('click, mouseover, mouseleave', _ => {}, false)
$.query.params(url = location.search)
$.query.string(object)
$.cookie.get(name)
$.cookie.set(name, value, expireDate)
$.empty(string or array or object)
$.is(instance, object)
$.storage.get(key)
$.storage.set(key, value)
$.storage.clear()
$.storage.remove(key)
$.storage.change()
$.storage.status()
$.number.format(number)
$.number.rand(min, max)
$.date.format('YYYY-MM-DD')
$.date.now()
$.ajax = async ({
url, method = 'get',
body = {},
credentials = 'omit',
mode = 'cors',
cache = 'default',
headers = {},
timeout = 3000
})