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

html-entities

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-entities - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "html-entities",
"version": "1.0.0",
"version": "1.0.1",
"description": "Faster HTML entities encode/decode library.",

@@ -5,0 +5,0 @@ "keywords": [

node-html-entities
==================
Faster html entities library
Faster html entities library.
Installation
------------
npm install html-entities
Usage
-----
####Basic HTML entities####
HTML validity and XSS attack prevention you can achieve from BasicHtmlEntities class.
```javascript
var Entities = require('html-entities').BasicHtmlEntities;
entities = new Entities();
console.log(entities.encode('<>"&©®')); // &lt;&gt;&quot;&amp;©®
console.log(entities.decode('&lt;&gt;&quot;&amp;&copy;&reg;')); // <>"&copy;&reg;
```
####Full HTML entities encoding/decoding####
```javascript
var Entities = require('html-entities').FullHtmlEntities;
entities = new Entities();
console.log(entities.encode('<>"&©®')); // &lt;&gt;&quot;&amp;&copy;&reg;
console.log(entities.decode('&lt;&gt;&quot;&amp;&copy;&reg;')); // <>"&©®
```
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