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

buffer-encoding

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer-encoding

Convert buffers across different encodings, with encoding detection support.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
decreased by-35.29%
Maintainers
1
Weekly downloads
 
Created
Source

buffer-encoding

Convert buffers across different encodings, with encoding detection support.

Built on top of encoding and jschardet.

var convert = require('buffer-encoding').convert

var buf = convert(someBuf, 'gb2312', 'utf8') // utf8 => gb2312
var buf = convert(someBuf, 'utf8', 'gb2312') // gb2312 => utf8

var buf = convert(someStr, 'utf8', 'gb2312') // or string input instead

var buf = convert(someBuf, 'utf8') // even with encoding detection
var buf = convert(someBuf) // whatever => utf8
convert(bufferOrString, [toEncoding], [fromEncoding])

FAQs

Package last updated on 17 Sep 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