html5entitieses6

1.0.1 • Public • Published

Usage

Can be used in modern browsers that use ES6 import.

<body>
  <h1 id="h1"></h1>
  <script type="module">
    import { Html5Entities } from "https://www.unpkg.com/html5entitieses6";
    const entities = new Html5Entities();

    const msg = entities.decode("&#039;hello world&#39;");
    h1.textContent = msg;
    console.log(msg);
  </script>
</body>

Credits:

Code is from https://www.npmjs.com/package/html-entities but instead of using module.exports to export the function, I changed it to export function Html5Entities () {}.

/html5entitieses6/

    Package Sidebar

    Install

    npm i html5entitieses6

    Weekly Downloads

    7

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    51.1 kB

    Total Files

    4

    Last publish

    Collaborators

    • avcoder