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

as-buffer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

as-buffer - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

7

index.js

@@ -5,4 +5,4 @@ if (!typeof Promise !== 'function') {

module.exports = (s, _maxsize) =>
new Promise((resolve, reject) => {
module.exports = function(s, _maxsize) {
return new Promise(function (resolve, reject) {
if (Buffer.isBuffer(s) || Array.isArray(s) || typeof s === 'string') {

@@ -15,3 +15,3 @@ return resolve(Buffer.from(s));

var size = 0;
s.on('data', d => {
s.on('data', function (d) {
bufs.push(d);

@@ -37,1 +37,2 @@ size += d.length;

});
};
{
"name": "as-buffer",
"version": "1.5.1",
"version": "1.5.2",
"description": "stream or anything to buffer as a Promise",

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

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