@ultraq/string-utils

WebJar for @ultraq/string-utils

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

ultraq__string-utils
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

@ultraq/string-utils
WebJar for @ultraq/string-utils
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/ultraq/string-utils

Download ultraq__string-utils

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/ultraq__string-utils/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>ultraq__string-utils</artifactId>
    <version>2.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/ultraq__string-utils/
implementation 'org.webjars.npm:ultraq__string-utils:2.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/ultraq__string-utils/
implementation ("org.webjars.npm:ultraq__string-utils:2.1.0")
'org.webjars.npm:ultraq__string-utils:jar:2.1.0'
<dependency org="org.webjars.npm" name="ultraq__string-utils" rev="2.1.0">
  <artifact name="ultraq__string-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='ultraq__string-utils', version='2.1.0')
)
libraryDependencies += "org.webjars.npm" % "ultraq__string-utils" % "2.1.0"
[org.webjars.npm/ultraq__string-utils "2.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

string-utils

Build Status Coverage Status npm Bundlephobia minified size

A collection of utilities for JavaScript strings.

Installation

Via npm:

npm install @ultraq/string-utils

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.

Versions

Version
2.1.0
2.0.0
1.2.0