utf8-buffer-sizeCopyright (c) 2018 Rafael da Silva Rocha. https://github.com/rochars/utf8-buffer-size Return how many bytes are needed to serialize a UTF-8 string.
- No dependencies
- MIT licensed
- Use it out of the box in the browser
- Use it out of the box in Node
- Use it out of the box with TypeScript
- Less than 1KB!
Install``` npm install utf8-buffer-size ``` You can also download the UMD dist file in the ./dist folder: https://github.com/rochars/utf8-buffer-size/tree/master/dist
BrowserUse the compiled file in the /dist folder of this package: ```html ``` Or get it from the jsDelivr CDN: ```html ``` Or get it from unpkg: ```html ``` Or load it as a module using jspm: ```html ```
DistributionThis library is a ES module also distributed as a UMD module. It works out of the box in Node when installed with ``
npm install utf8-buffer-size``. It includes a TypeScript definition file: ./main.d.ts.
If you are using this lib in a browser:You can load ./dist/utf8-buffer-size.umd.js in the browser with ``
<script>`` tags. You can load it via the https://unpkg.com and https://www.jsdelivr.com/ CDNs: unpkg: ```html ``` jsDelivr: ```html ```