Socket
Book a DemoInstallSign in
Socket

js-dom-utility

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-dom-utility

DOM utility library

0.1.10
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

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)

FAQs

Package last updated on 28 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.