Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ent

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ent

Encode and decode HTML entities

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.5M
increased by2.34%
Maintainers
0
Weekly downloads
 
Created

What is ent?

The 'ent' npm package is used for encoding and decoding HTML entities. It provides a simple way to convert special characters to their corresponding HTML entities and vice versa.

What are ent's main functionalities?

Encoding HTML Entities

This feature allows you to encode special characters in a string to their corresponding HTML entities. This is useful for safely displaying user-generated content on a web page.

const ent = require('ent');
const encoded = ent.encode('<div>Hello & welcome!</div>');
console.log(encoded); // Output: &lt;div&gt;Hello &amp; welcome!&lt;/div&gt;

Decoding HTML Entities

This feature allows you to decode HTML entities back to their original characters. This is useful for processing HTML content that has been encoded.

const ent = require('ent');
const decoded = ent.decode('&lt;div&gt;Hello &amp; welcome!&lt;/div&gt;');
console.log(decoded); // Output: <div>Hello & welcome!</div>

Other packages similar to ent

Keywords

FAQs

Package last updated on 20 Jun 2024

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