Initial system import

This commit is contained in:
2025-12-25 23:08:06 +01:00
commit 4beb5806eb
4623 changed files with 682363 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
'use strict';
var Vinyl = require('vinyl');
var bl = require('bl');
function vinylContents(file, cb) {
if (!Vinyl.isVinyl(file)) {
cb(new Error('Must be a Vinyl object'));
return;
}
if (file.isBuffer()) {
cb(null, file.contents);
return;
}
if (file.isStream()) {
var bufferList = bl(function (err, data) {
if (err) {
cb(err);
return;
}
cb(null, data);
});
file.contents.pipe(bufferList);
return;
}
cb();
}
module.exports = vinylContents;