Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heppokofrontend/html-entity
Encodes and decodes an HTML Entity.
https://github.com/heppokofrontend/html-entity
frontend html-entities javascript npm-package typescript web
Last synced: 8 days ago
JSON representation
Encodes and decodes an HTML Entity.
- Host: GitHub
- URL: https://github.com/heppokofrontend/html-entity
- Owner: heppokofrontend
- License: mit
- Created: 2021-03-27T12:05:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-03-27T15:22:41.000Z (over 3 years ago)
- Last Synced: 2024-09-04T22:23:20.846Z (2 months ago)
- Topics: frontend, html-entities, javascript, npm-package, typescript, web
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@heppokofrontend/html-entity
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @heppokofrontend/html-entity
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) [![Published on NPM](https://img.shields.io/npm/v/@heppokofrontend/html-entity.svg)](https://www.npmjs.com/package/@heppokofrontend/html-entity) [![](https://data.jsdelivr.com/v1/package/npm/@heppokofrontend/html-entity/badge)](https://www.jsdelivr.com/package/npm/@heppokofrontend/html-entity) [![Maintainability](https://api.codeclimate.com/v1/badges/1dad8f583434d9231b36/maintainability)](https://codeclimate.com/github/heppokofrontend/html-entity/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/1dad8f583434d9231b36/test_coverage)](https://codeclimate.com/github/heppokofrontend/html-entity/test_coverage) [![Known Vulnerabilities](https://snyk.io/test/npm/@heppokofrontend/html-entity/badge.svg)](https://snyk.io/test/npm/@heppokofrontend/html-entity)
[![@heppokofrontend/html-entity](https://snyk.io/advisor/npm-package/@heppokofrontend/html-entity/badge.svg)](https://snyk.io/advisor/npm-package/@heppokofrontend/html-entity)Encodes and decodes an HTML Entity.
## Usage
Installation:
```shell
npm install --save @heppokofrontend/html-entity
```Example:
```javascript
import { encodeHTMLEntities, decodeHTMLEntities } from '@heppokofrontend/html-entity';const string = 'hello world';
const htmlEntity = encodeHTMLEntities(string); // => hello worldconsole.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