ent
Encode and decode HTML entities
Last updated 5 months ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install ent 
SYNC missed versions from official npm registry.

ent

Encode and decode HTML entities

build status

example

var ent = require('ent');
console.log(ent.encode('<span>©moo</span>'))
console.log(ent.decode('&pi; &amp; &rho;'));
&lt;span&gt;&copy;moo&lt;/span&gt;
π & ρ

ent

methods

encode(str)

Escape unsafe characters in str with html entities.

decode(str)

Convert html entities in str back to raw text.

credits

HTML entity tables shamelessly lifted from perl's HTML::Entities

install

With npm do:

npm install ent

license

MIT

Current Tags

  • 2.2.1                                ...           latest (5 months ago)
  • 0.0.8                                ...           v0-backport (5 months ago)

15 Versions

  • 0.0.8                                ...           5 months ago
  • 2.2.1                                ...           5 months ago
  • 2.2.0                                ...           10 years ago
  • 2.1.1                                ...           10 years ago
  • 2.1.0                                ...           10 years ago
  • 2.0.0                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
  • 0.0.7                                ...           11 years ago
  • 0.0.6                                ...           11 years ago
  • 0.0.5                                ...           12 years ago
  • 0.0.4                                ...           13 years ago
  • 0.0.3                                ...           13 years ago
  • 0.0.2                                ...           14 years ago
  • 0.0.1                                ...           14 years ago
Maintainers (2)
Downloads
Total 3
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (9)

© 2010 - cnpmjs.org x YWFE | Home | YWFE