feathers-blob
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -13,10 +13,24 @@ 'use strict'; | ||
var _from2String = require('from2-string'); | ||
var _from = require('from2'); | ||
var _from2String2 = _interopRequireDefault(_from2String); | ||
var _from2 = _interopRequireDefault(_from); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// TODO publish to npm as `from2-buffer` | ||
// create a stream from a buffer | ||
// buffer -> stream | ||
function fromBuffer(buffer) { | ||
return (0, _from2String2.default)(buffer.toString()); | ||
//assert.ok(Buffer.isBuffer(buffer)) | ||
return (0, _from2.default)(function (size, next) { | ||
if (buffer.length <= 0) { | ||
return this.push(null); | ||
} | ||
var chunk = buffer.slice(0, size); | ||
buffer = buffer.slice(size); | ||
next(null, chunk); | ||
}); | ||
} | ||
@@ -23,0 +37,0 @@ |
{ | ||
"name": "feathers-blob", | ||
"description": "Feathers blob service", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"homepage": "https://github.com/feathersjs/feathers-blob", | ||
@@ -55,3 +55,3 @@ "main": "lib/", | ||
"debug": "^2.2.0", | ||
"from2-string": "^1.1.0", | ||
"from2": "^2.1.1", | ||
"mime-types": "^2.1.10", | ||
@@ -58,0 +58,0 @@ "uberproto": "^1.2.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
11050
145
+ Addedfrom2@^2.1.1
- Removedfrom2-string@^1.1.0
- Removedfrom2-string@1.1.0(transitive)