socket.io-stream
Advanced tools
Comparing version 0.5.2 to 0.5.3
{ | ||
"name": "socket.io-stream", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "stream for socket.io", | ||
@@ -24,4 +24,3 @@ "author": "Naoyuki Kanezawa <naoyuki.kanezawa@gmail.com>", | ||
"scripts": { | ||
"test": "make test-all", | ||
"prepublish": "make test-all build" | ||
"test": "make test-all" | ||
}, | ||
@@ -28,0 +27,0 @@ "dependencies": { |
@@ -78,2 +78,18 @@ # Socket.IO stream | ||
#### Upload progress | ||
You can track upload progress like the following: | ||
```js | ||
var blobStream = ss.createBlobReadStream(file); | ||
var size = 0; | ||
blobStream.on('data', function(chunk) { | ||
size += chunk.length; | ||
console.log(Math.floor(size / file.size * 100) + '%'); | ||
// e.g. '42%' | ||
}); | ||
blobStream.pipe(stream); | ||
``` | ||
## Documentation | ||
@@ -80,0 +96,0 @@ |
Sorry, the diff of this file is too big to display
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
167367
114