Socket
Book a DemoInstallSign in
Socket

entity-decode

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

entity-decode

Environment agnostic entity decoder

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
2.5K
2.59%
Maintainers
1
Weekly downloads
 
Created
Source

entity-decode

This purpose of this library is to provide a single interface to browser and node decode implementation.

It is using the following two underlying implementations:

  • Browser: micro decode implementation using browser's NodeElement.textContent method
  • Node: he

Example usage

// Load default implementation
var decode = require('entity-decode');

// Load specific version
var decode = require('entity-decode/browser') // browser version
var decode = require('entity-decode/node') // node version

decode('foo © bar ≠ baz 𝌆 qux') 
// returns 'foo © bar ≠ baz 𝌆 qux'

License

entity-decode is available under the MIT license.

Keywords

entity

FAQs

Package last updated on 01 Feb 2025

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