Socket
Socket
Sign inDemoInstall

read-chunk

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

11

index.js

@@ -22,2 +22,6 @@ 'use strict';

if (bytesRead < len) {
buf = buf.slice(0, bytesRead);
}
cb(null, buf);

@@ -32,5 +36,10 @@ });

var fd = fs.openSync(filepath, 'r');
fs.readSync(fd, buf, 0, len, pos);
var bytesRead = fs.readSync(fd, buf, 0, len, pos);
fs.closeSync(fd);
if (bytesRead < len) {
buf = buf.slice(0, bytesRead);
}
return buf;
};

2

package.json
{
"name": "read-chunk",
"version": "1.0.0",
"version": "1.0.1",
"description": "Read a chunk from a file",

@@ -5,0 +5,0 @@ "license": "MIT",

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