♦
or ♦
to 💎
Escape HTML entities like Use in either nodejs or the browser. It's really simple and works pretty fast.
Installation
Browser 🌎 : https://cdn.jsdelivr.net/npm/entity-escape@latest/index.min.js
Node.js 🛠 : npm install --save entity-escape
Usage
Browser:
var text1 = Entities; var text2 = Entities; console;
Node.js:
const Entities = ; var text1 = Entities; var text2 = Entities; console;
Methods and Options
Entities; //options are {silent:false(default on node, true default on browser),replaceNumbers:true(true default on node, replaces numbered entities even if no names are present)} Entities; //options are {silent:false(default on node, true default on browser)}
In case {silent:true}
no output is rendered to the console. In case replaceNumbers:false
only those characters which are explicitly named HTML entities will be replaced.