Socket
Socket
Sign inDemoInstall

fs-jetpack

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-jetpack - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

0.9.1 (2016-05-21)
-------------------
* Bug-fixed `jetpack.read('nonexistent_file', 'json')`.
0.9.0 (2016-05-10)

@@ -2,0 +6,0 @@ -------------------

7

lib/read.js

@@ -49,7 +49,6 @@ /* eslint no-console:1 */

// If file doesn't exist return undefined instead of throwing.
data = undefined;
} else {
// Otherwise rethrow the error
throw err;
return undefined;
}
// Otherwise rethrow the error
throw err;
}

@@ -56,0 +55,0 @@

{
"name": "fs-jetpack",
"description": "Better file system API",
"version": "0.9.0",
"version": "0.9.1",
"author": "Jakub Szwacz <jakub@szwacz.com>",

@@ -6,0 +6,0 @@ "dependencies": {

@@ -5,2 +5,4 @@ /* eslint-env jasmine */

var Q = require('q');
describe('read |', function () {

@@ -151,7 +153,14 @@ var fse = require('fs-extra');

expectations(jetpack.read('nonexistent.txt'));
expectations(jetpack.read('nonexistent.txt', 'json'));
expectations(jetpack.read('nonexistent.txt', 'buffer'));
// ASYNC
jetpack.readAsync('nonexistent.txt')
.then(function (content) {
expectations(content);
Q.spread([
jetpack.readAsync('nonexistent.txt'),
jetpack.readAsync('nonexistent.txt', 'json'),
jetpack.readAsync('nonexistent.txt', 'buffer')
], function (content1, content2, content3) {
expectations(content1);
expectations(content2);
expectations(content3);
done();

@@ -158,0 +167,0 @@ });

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