0.1.10 • Published 3 years ago

js-dom-utility v0.1.10

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

js-dom-utility

DOM utility library

Install

Install with npm:

$ npm i --save js-dom-utility

Usage

import {ElementUtil,ObjectUtil,StringUtil} from "js-dom-utility"

Short description

  • ElementUtil + matches(HTMLElement, selector) : HTMLElement.matches() wrapper and polyfill (if the browser does not support method) + getParents(Element,[selector]) get parents with selector + closest(HTMLElement, selector) : HTMLElement.closest() wrapper and polyfill (if the browser does not support method)

  • ObjectUtil + isNull(val) : if the val is undefined or null return true,else return false.

  • StringUtil + format(str, args):format string '{0},{1}' with args + isNullOrEmpty(val):string is null or '' return true + Trim(str,[c]):replace start and end of string with arg c(c default nullspace) + TrimStart(str,[c]):replace end of string with c (c default nullspace) + TrimEnd(str,[c]):replace end of string with c(c default nullspace)

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago