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

blob-to-buffer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blob-to-buffer - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

20

index.js

@@ -16,20 +16,10 @@ /* global Blob, FileReader */

function onLoad (e) {
unregisterEvents()
cb(null, toBuffer(e.target.result))
function onLoadEnd (e) {
reader.removeEventListener('loadend', onLoadEnd, false)
if (e.error) cb(e.error)
else cb(null, toBuffer(reader.result))
}
function onError (err) {
unregisterEvents()
cb(err)
}
function unregisterEvents () {
reader.removeEventListener('load', onLoad)
reader.removeEventListener('error', onError)
}
reader.addEventListener('load', onLoad)
reader.addEventListener('error', onError)
reader.addEventListener('loadend', onLoadEnd, false)
reader.readAsArrayBuffer(blob)
}
{
"name": "blob-to-buffer",
"description": "Convert a Blob to a Buffer",
"version": "1.2.2",
"version": "1.2.3",
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)",

@@ -6,0 +6,0 @@ "bugs": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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