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

@ultraq/string-utils

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ultraq/string-utils

A collection of utilities for JavaScript strings

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
683
-48.49%
Maintainers
1
Weekly downloads
 
Created
Source

string-utils

Build Status npm License

A collection of utilities for JavaScript strings.

Installation

Via npm:

npm install @ultraq/string-utils --save

API

escapeHtml(string)

Escapes special HTML characters in a string with their entity code equivalents. Returns a string safe to use as text within an HTML document.

  • string: string to escape.

format(template, ...values)

Returns the replacement of each placeholder in a template string with a corresponding replacement value.

  • template: template string containing placeholders in the format or {n} where n is the corresponding index value to have filled-in.
  • ...values: argument list of values to fill in the placeholders in the template string with.

Keywords

string

FAQs

Package last updated on 30 Apr 2017

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