Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

febs

Package Overview
Dependencies
Maintainers
1
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

febs - npm Package Compare versions

Comparing version 0.2.10 to 0.2.11

6

HISTORY.md

@@ -45,2 +45,6 @@

==================
- [feature] febs.utils.getTimeStringFromNow
- [feature] febs.utils.getTimeStringFromNow
0.2.11
==================
- [bugfix] control upload.

2

package.json

@@ -45,3 +45,3 @@ {

"name": "febs",
"version": "0.2.10"
"version": "0.2.11"
}

@@ -0,0 +0,0 @@ febs 库是一些常用的工具的合集;

exports.upload = require('./upload');

@@ -32,3 +32,2 @@ 'use strict';

function save_to(stream, writeStream, writeStreamPath, size, crc32, done) {
// streams2+: assert the stream encoding is buffer.

@@ -133,2 +132,4 @@ var state = stream._readableState;

writeStream.removeListener('close', onFinish)
writeStream.end()

@@ -150,3 +151,3 @@ stream = writeStream = null

*/
exports.accept = async function(app, conditionCB)
exports.accept = function(app, conditionCB)
{

@@ -192,12 +193,15 @@ assert(conditionCB);

co(function* () {
// yield each part as a stream
var part;
while (part = yield parts) {
var srcStream = part;
parts(function(err, part){
if (err) {
reject(err);
return;
}
conditionCB(query.data, Number(query.size), part.filename, part.mimeType)
var srcStream = part;
conditionCB(query.data, Number(query.size), part.filename, part.mimeType)
.then(fn=>{
if (!fn)
{
console.debug('febs upload.accpet un return a filename');
if (typeof srcStream.pause === 'function')

@@ -227,23 +231,17 @@ srcStream.pause();

co(function* () {
var ret = yield save_to(srcStream, destStream, fn, Number(query.size), Number(query.crc32));
return ret;
}).then(function (value) {
resolve(value);
}, function (err) {
reject(err);
save_to(srcStream, destStream, fn, Number(query.size), Number(query.crc32), (err, ret)=>{
if (err)
reject(err);
else
resolve(ret);
});
})
.then(ret=>{
})
.catch(err=>{
reject(err);
});
return;
}
}).then(function (value) {
}, function (err) {
reject(err);
});
});
};

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc