Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 15, 2024 via pnpm
Package summary
Share
0
issues
1
license
1
MIT
Package created
15 Feb 2013
Version published
24 Jun 2023
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
html-entities@2.4.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
ⓘ This is a list of html-entities 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does html-entities do?

HTML-Entities, as its name suggests, is a powerful library that enables efficient encoding and decoding of HTML entities. It stands as the fastest library for these functions, making it a robust choice for developers working with HTML content. This library is able to replace special HTML characters and non-ASCII characters depending on your needs. It features TypeScript and Flow types, making it a flexible and versatile tool that can adapt to various development requirements. Its usage can improve the readability and compatibility of your HTML content across different browsers or rendering engines.

How do you use html-entities?

To use the html-entities package, you first need to install it in your Node.js project with the npm install html-entities command. Once it's installed, you can import specific functions from the html-entities module, like encode and decode. The encode function replaces HTML special characters in a text string, while the decode function does the opposite, replacing entity references with their corresponding characters.

Usage examples for these functions in JavaScript are:

import {encode, decode} from 'html-entities';

// Example of encoding HTML entities
let encodedText = encode('< > " \' & © ∆');
console.log(encodedText);  // Outputs: '&lt; &gt; &quot; &apos; &amp; © ∆'

// Example of decoding HTML entities
let decodedText = decode('&lt; &gt; &quot; &apos; &amp; &#169; &#8710;');
console.log(decodedText);  // Outputs: '< > " \' & © ∆'

These are basic examples, but both encode and decode functions accept additional options for more advanced use-cases.

Where are the html-entities docs?

The documentation for HTML-Entities is available directly on the README of its GitHub page here. You can explore more in-depth information about HTML-Entities' available functions, their usage, options, and performance comparison with other libraries. Furthermore, the GitHub page is frequently updated with newest release notes and information, ensuring you always have access to the most accurate and comprehensive knowledge about HTML-Entities.