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

stream-browserify

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-browserify - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "stream-browserify",
"version": "0.1.0",
"version": "0.1.1",
"description": "the stream module from node core for browsers",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,12 +28,14 @@ var path = require('path');

test('.writable writing ArrayBuffer', function(t) {
var writable = new TestWritable();
writable.write(typedArray.buffer);
writable.end();
t.equal(writable._written.length, 1);
t.equal(writable._written[0].toString(), 'X')
t.end()
});
if (typeof Uint8array !== 'undefined') {
test('.writable writing ArrayBuffer', function(t) {
var writable = new TestWritable();
writable.write(typedArray.buffer);
writable.end();
t.equal(writable._written.length, 1);
t.equal(writable._written[0].toString(), 'X')
t.end()
});
}

@@ -40,0 +42,0 @@ test('.writable writing Uint8array', function(t) {

@@ -31,7 +31,11 @@ // Copyright Joyent, Inc. and other Node contributors.

? function (x) { return x instanceof Uint8Array }
: function () { return false }
: function (x) {
return x && x.constructor && x.constructor.name === 'Uint8Array'
}
;
var isArrayBuffer = typeof ArrayBuffer !== 'undefined'
? function (x) { return x instanceof ArrayBuffer }
: function () { return false }
: function () {
return x && x.constructor && x.constructor.name === 'ArrayBuffer'
}
;

@@ -182,3 +186,3 @@

chunk = new Buffer(chunk);
if (isArrayBuffer(chunk))
if (isArrayBuffer(chunk) && typeof Uint8Array !== 'undefined')
chunk = new Buffer(new Uint8Array(chunk));

@@ -185,0 +189,0 @@

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