Socket
Socket
Sign inDemoInstall

parse-entities

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-entities

Parse HTML character references: fast, spec-compliant, positional information


Version published
Weekly downloads
8.5M
increased by6.51%
Maintainers
1
Weekly downloads
 
Created

What is parse-entities?

The parse-entities npm package is used to parse HTML entities in text. It can decode named and numerical character references in HTML, making it useful for processing and sanitizing HTML content.

What are parse-entities's main functionalities?

Decode named character references

This feature allows you to decode named character references in a string. For example, it converts " to ".

const parseEntities = require('parse-entities');
const decoded = parseEntities('The "quick" brown fox');
console.log(decoded); // Output: The "quick" brown fox

Decode numerical character references

This feature allows you to decode numerical character references in a string. For example, it converts 😀 to 😀.

const parseEntities = require('parse-entities');
const decoded = parseEntities('The 😀 emoji');
console.log(decoded); // Output: The 😀 emoji

Decode mixed character references

This feature allows you to decode a mix of named and numerical character references in a string.

const parseEntities = require('parse-entities');
const decoded = parseEntities('The "quick" brown fox jumps over the lazy dog🐶');
console.log(decoded); // Output: The "quick" brown fox jumps over the lazy dog🐶

Other packages similar to parse-entities

Keywords

FAQs

Package last updated on 15 May 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc