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

rw

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rw - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

test/encode-object-async

4

lib/rw/read-file.js

@@ -5,3 +5,3 @@ var fs = require("fs"),

module.exports = function(filename, options, callback) {
if (arguments.length < 2) callback = options, options = null;
if (arguments.length < 3) callback = options, options = null;
fs.stat(filename, function(error, stat) {

@@ -13,3 +13,3 @@ if (error) return callback(error);

var decoder = decode(options);
fs.createReadStream(filename, options && {flags: options.flag || "r"}) // N.B. flag / flags
fs.createReadStream(filename, options ? {flags: options.flag || "r"} : {}) // N.B. flag / flags
.on("error", callback)

@@ -16,0 +16,0 @@ .on("data", function(d) { decoder.push(d); })

@@ -5,3 +5,3 @@ var fs = require("fs"),

module.exports = function(filename, data, options, callback) {
if (arguments.length < 3) callback = options, options = null;
if (arguments.length < 4) callback = options, options = null;
fs.stat(filename, function(error, stat) {

@@ -12,3 +12,3 @@ if (error && error.code !== "ENOENT") return callback(error);

} else {
fs.createWriteStream(filename, options && {flags: options.flag || "w"}) // N.B. flag / flags
fs.createWriteStream(filename, options ? {flags: options.flag || "w"} : {}) // N.B. flag / flags
.on("error", function(error) { callback(error.code === "EPIPE" ? null : error); }) // ignore broken pipe, e.g., | head

@@ -15,0 +15,0 @@ .end(encode(data, options), callback);

{
"name": "rw",
"version": "1.1.0",
"version": "1.1.1",
"description": "Now stdin and stdout are files.",

@@ -24,4 +24,9 @@ "keywords": [

"scripts": {
"test": "test/run-tests && eslint index.js lib"
"test": "test/run-tests && eslint index.js lib",
"prepublish": "npm test",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git tag -am \"Release $VERSION.\" v${VERSION} && git push --tags"
},
"devDependencies": {
"d3-queue": "2"
}
}

Sorry, the diff of this file is not supported yet

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