pull-pushable
Advanced tools
Comparing version 1.1.3 to 1.1.4
{ | ||
"name": "pull-pushable", | ||
"description": "pull-stream with a push interface", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"homepage": "https://github.com/dominictarr/pull-pushable", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -15,5 +15,28 @@ # pull-pushable | ||
``` | ||
``` | ||
## Example 2 | ||
Create a false source stream with a `.push(data, cb?)` | ||
property. Use when you really need a push api, | ||
or need to adapt pull-stream to some other push api. | ||
``` js | ||
function ls (dir) { | ||
var ps = pull.pushable() | ||
fs.readdir(dir, function (err, ls) { | ||
if(err) return ps.end(err) | ||
ls.forEach(function (file) { | ||
ps.push(path.resolve(dir, file)) | ||
}) | ||
ps.end() | ||
}) | ||
return ps | ||
} | ||
``` | ||
``` | ||
## License | ||
MIT |
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
5268
42