Socket
Socket
Sign inDemoInstall

fs-minipass

Package Overview
Dependencies
2
Maintainers
7
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

27

index.js

@@ -6,8 +6,18 @@ 'use strict'

// for writev
const binding = process.binding('fs')
const writeBuffers = binding.writeBuffers
let writev = fs.writev
/* istanbul ignore next */
const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback
if (!writev) {
// This entire block can be removed if support for earlier than Node.js
// 12.9.0 is not needed.
const binding = process.binding('fs')
const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback
writev = (fd, iovec, pos, cb) => {
const done = (er, bw) => cb(er, bw, iovec)
const req = new FSReqWrap()
req.oncomplete = done
binding.writeBuffers(fd, iovec, pos, req)
}
}
const _autoClose = Symbol('_autoClose')

@@ -272,3 +282,3 @@ const _close = Symbol('_close')

if (typeof buf === 'string')
buf = new Buffer(buf, enc)
buf = Buffer.from(buf, enc)

@@ -378,9 +388,2 @@ if (this[_ended]) {

const writev = (fd, iovec, pos, cb) => {
const done = (er, bw) => cb(er, bw, iovec)
const req = new FSReqWrap()
req.oncomplete = done
binding.writeBuffers(fd, iovec, pos, req)
}
exports.ReadStream = ReadStream

@@ -387,0 +390,0 @@ exports.ReadStreamSync = ReadStreamSync

{
"name": "fs-minipass",
"version": "2.0.0",
"version": "2.0.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc