/html-entity

Encodes and decodes an HTML Entity.

Primary LanguageTypeScriptMIT LicenseMIT

@heppokofrontend/html-entity

MIT License Published on NPM Maintainability Test Coverage Known Vulnerabilities @heppokofrontend/html-entity

Encodes and decodes an HTML Entity.

Usage

Installation:

npm install --save @heppokofrontend/html-entity

Example:

import { encodeHTMLEntities, decodeHTMLEntities } from '@heppokofrontend/html-entity';

const string = 'hello world';
const htmlEntity = encodeHTMLEntities(string); // => hello world

console.log(decodeHTMLEntities(htmlEntity)); // > hello world

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT