New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

util.html

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

util.html

HTML helper functions

latest
Source
npmnpm
Version
0.0.12
Version published
Maintainers
1
Created
Source

util.html

HTML helper functions

build analysis code style: prettier testing NPM

Installation

This module uses yarn to manage dependencies and run scripts for development.

To install as an application dependency:

$ yarn add util.html

To build the app and run all tests:

$ yarn run all

Overview

This module contains custom HTML manipulation functions.

API

Attributes

  • events - an array of possible events that can be used in javascript for event listeners. The list was taken from MDN.

functions

  • getFontWidth - Reads the current font style information from the body of the current document.
  • getTextWidth - Takes an input string and font settings and computes the pixel width of the string.
  • newlineToBreak - takes a string with newline characters and replaces them with <br />
  • translateHTML - converts special HTML characters to their single character equivalents (such as &quote; to ").
  • trimHTML - special trim function to remove spaces from the front/end of an HTML string.

FAQs

Package last updated on 15 Dec 2019

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