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

@ethersproject/shims

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/shims - npm Package Compare versions

Comparing version 5.0.10 to 5.0.11

6

package.json

@@ -17,3 +17,3 @@ {

],
"gitHead": "211defa27f85af111e81b400a18922f35dff21e1",
"gitHead": "6c43e20e7a68f3f5a141c74527ec63d9fe8458be",
"keywords": [

@@ -37,5 +37,5 @@ "Ethereum",

},
"tarballHash": "0x533d308926d3d1946b4d41c8902cc203cc06ac205f1b4df68314fb0402a5b50d",
"tarballHash": "0x3a0ffcff03da2a955e81177cb4edd1677cb42156c95ef5961a83a7da93814ac6",
"types": "./lib/index.d.ts",
"version": "5.0.10"
"version": "5.0.11"
}

@@ -88,23 +88,21 @@ 'use strict';

fr.readAsArrayBuffer(new Blob([ "hello" ], { type: "text/plain" }));
return;
} catch (error) { }
shims.push("FileReader.prototype.readAsArrayBuffer");
FileReader.prototype.readAsArrayBuffer = function (blob) {
if (this.readyState === this.LOADING) throw new Error("InvalidStateError");
this._setReadyState(this.LOADING);
this._result = null;
this._error = null;
var fr = new FileReader();
fr.onloadend = () => {
var content = atob(fr.result.split(",").pop().trim());
var buffer = new ArrayBuffer(content.length);
var view = new Uint8Array(buffer);
view.set(Array.from(content).map(c => c.charCodeAt(0)));
this._result = buffer;
this._setReadyState(this.DONE);
};
fr.readAsDataURL(blob);
} catch (error) {
shims.push("FileReader.prototype.readAsArrayBuffer");
FileReader.prototype.readAsArrayBuffer = function (blob) {
if (this.readyState === this.LOADING) { throw new Error("InvalidStateError"); }
this._setReadyState(this.LOADING);
this._result = null;
this._error = null;
var fr = new FileReader();
fr.onloadend = () => {
var content = atob(fr.result.split(",").pop().trim());
var buffer = new ArrayBuffer(content.length);
var view = new Uint8Array(buffer);
view.set(Array.from(content).map(c => c.charCodeAt(0)));
this._result = buffer;
this._setReadyState(this.DONE);
};
fr.readAsDataURL(blob);
}
}
} catch (error) {

@@ -111,0 +109,0 @@ console.log("Missing FileReader; unsupported platform");

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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