fs-jetpack
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -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 @@ ------------------- |
@@ -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 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177089
5103