Socket
Socket
Sign inDemoInstall

ent

Package Overview
Dependencies
Maintainers
1
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


Version published
Weekly downloads
5.3M
decreased by-0.41%
Maintainers
1
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 17 Jul 2013

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