filestream-cache
Advanced tools
Comparing version 1.2.0 to 1.2.1
14
index.js
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var fs = require('fs'); | ||
@@ -8,2 +10,3 @@ var path = require('path'); | ||
var mkdirp = require('mkdirp'); | ||
var streamcat = require('streamcat'); | ||
var twelveHoursInSeconds = 43200; | ||
@@ -92,3 +95,9 @@ | ||
cache.writeThrough(identifier, newStream).pipe(passThroughStream); | ||
var stream = cache.writeThrough(identifier, newStream); | ||
stream.on('error', function(error) { | ||
passThroughStream.emit('error', error); | ||
}); | ||
stream.pipe(passThroughStream); | ||
} else { | ||
@@ -251,4 +260,3 @@ stream.pipe(passThroughStream); | ||
return cachedStream; | ||
return streamcat([cachedStream]); | ||
}; | ||
@@ -255,0 +263,0 @@ |
@@ -8,3 +8,4 @@ { | ||
"mocha": "^2.2.4", | ||
"resumer": "0.0.0" | ||
"resumer": "0.0.0", | ||
"streamcat": "^2.6.0" | ||
}, | ||
@@ -18,4 +19,4 @@ "dependencies": { | ||
}, | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"license": "MIT" | ||
} |
@@ -20,4 +20,10 @@ # filestream-cache | ||
TODO: (See JSDoc comments in `index.js`) | ||
#### `get(identifier, options, createCallback)` | ||
#### `purge(filter)` | ||
#### `isStale(identifier)` | ||
#### `writeThrough(identifier, stream)` | ||
### Example | ||
@@ -24,0 +30,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
21070
514
50
3