✨ Buk
encode, decode, filter, skip, HTML special chars

$ npm i buk --save
Usage
import { encodeHTML } from 'buk';
var { encodeHTML } = require('buk');
Or include it via jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/buk@1.2.1/index.min.js"></script>
access via object : buk
Example : buk.skipHTML("<scrip>hello world</script>living<br />")
// hello worldliving
Methods & Examples
- encodeHTML(String): String|TypeError
*chars to encode : & < > " ' @ + /
encodeHTML("<scrip>hello world</script>")
- decodeHTML(String): String|TypeError
*chars to decode : & < > " ' @ + /
decodeHTML("<div>hello world</div>")
- skipHTML(String): String|TypeError
skipHTML("<scrip>hello world</script> 2019<br />")
Notes
- TypeError : Invalid type or no argument passed to function.
- Works both in Node.js and in the browser.
- All pull requests are welcome, feel free.
License
MIT