htmled
Version:
A simple JavaScript library for encoding and decoding HTML entities.
11 lines (8 loc) • 343 B
JavaScript
const htmled = require('../htmled.js');
console.log(htmled);
// Encode HTML
const encoded = htmled.encode(`<p>This is a <b>bold</b> statement.</p>`);
console.log('Encoded HTML:', encoded);
// Decode HTML
const decoded = htmled.decode('<p>This is a <b>bold</b> statement.</p>');
console.log('Decoded HTML:', decoded);