Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

utf8-encoding

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utf8-encoding

utf8 encoder/decoder of whatwg Encoding Living Standard https://encoding.spec.whatwg.org/

  • 0.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.2K
decreased by-8.24%
Maintainers
1
Weekly downloads
 
Created
Source

Isomorphic Encoding Standard implementation ignore support without UTF-8

about

implementation of Encoding Standard TextEncoder & TextDecoder. https://encoding.spec.whatwg.org/

but this spec includes tons of legacy encoding support you may never use. so support only UTF-8 encoding/decoding for make script small for browser friendly :)

install

$ npm install utf8-encoding

usage

works in node and browser. Isomorphic !! no Browserify.

var encoder = new TextEncoder();
var decoder = new TextDecoder();
console.log(encoder.encode("beer!🍻"));
// Uint8Array[98, 101, 101, 114, 33, 240, 159, 141, 187]
console.log(decoder.decode(new Uint8Array([98, 101, 101, 114, 33, 240, 159, 141, 187])));
// "beer!🍻

build and test

$ npm install
$ npm test

and also open test/index.html in your browser and see console.

for TypeScript

use utf8-encoding.d.ts

other types which this scripts depends on are in types directory.

release process

  • develop/maintain on master branch
  • if finished, dump version to new one in package.json
  • checkout release and merge master --no-ff
  • build via npm test
  • commit build
  • add tag
  • push to github
  • npm publish

License

The MIT License (MIT) Copyright (c) 2015 Jxck

Keywords

FAQs

Package last updated on 03 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc