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: 5 months 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 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-27T15:22:41.000Z (over 4 years ago)
- Last Synced: 2025-01-29T18:18:06.779Z (6 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
[](LICENSE) [](https://www.npmjs.com/package/@heppokofrontend/html-entity) [](https://www.jsdelivr.com/package/npm/@heppokofrontend/html-entity) [](https://codeclimate.com/github/heppokofrontend/html-entity/maintainability) [](https://codeclimate.com/github/heppokofrontend/html-entity/test_coverage) [](https://snyk.io/test/npm/@heppokofrontend/html-entity)
[](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