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

popsicle

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

popsicle - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

bower.json
{
"name": "popsicle",
"main": "popsicle.js",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "https://github.com/blakeembrey/popsicle",

@@ -6,0 +6,0 @@ "authors": [

{
"name": "popsicle",
"version": "0.2.1",
"version": "0.2.2",
"description": "Simple HTTP requests for node and the browser",

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

@@ -85,2 +85,20 @@ (function (root) {

/**
* Return the byte length of an input.
*
* @param {(String|Buffer)} data
* @return {Number}
*/
function byteLength (data) {
if (Buffer.isBuffer(data)) {
return data.length;
}
if (typeof data === 'string') {
return Buffer.byteLength(data);
}
return 0;
}
/**
* Create a stream error instance.

@@ -526,3 +544,3 @@ *

request.write = function (data) {
self._setRequestLength(self._requestLength + Buffer.byteLength(data));
self._setRequestLength(self._requestLength + byteLength(data));

@@ -547,3 +565,4 @@ return write.apply(request, arguments);

function onResponseData (data) {
self._setResponseLength(self._responseLength + Buffer.byteLength(data));
// Data should always be a `Buffer` instance.
self._setResponseLength(self._responseLength + data.length);
}

@@ -550,0 +569,0 @@

@@ -1,2 +0,4 @@

var isPhantom = window.outerWidth === 0 && window.outerHeight === 0;
var isPhantom = typeof window !== 'undefined' &&
window.outerWidth === 0 &&
window.outerHeight === 0;

@@ -3,0 +5,0 @@ var REMOTE_URL = 'http://localhost:4567';

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