initial javascript rewrite

This commit is contained in:
Dawid Dziurla
2020-02-29 23:01:03 +01:00
parent f16ced8d0e
commit fa231fb236
53 changed files with 14218 additions and 14 deletions

1257
node_modules/nodemailer/lib/mime-node/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

33
node_modules/nodemailer/lib/mime-node/last-newline.js generated vendored Normal file
View File

@ -0,0 +1,33 @@
'use strict';
const Transform = require('stream').Transform;
class LastNewline extends Transform {
constructor() {
super();
this.lastByte = false;
}
_transform(chunk, encoding, done) {
if (chunk.length) {
this.lastByte = chunk[chunk.length - 1];
}
this.push(chunk);
done();
}
_flush(done) {
if (this.lastByte === 0x0a) {
return done();
}
if (this.lastByte === 0x0d) {
this.push(Buffer.from('\n'));
return done();
}
this.push(Buffer.from('\r\n'));
return done();
}
}
module.exports = LastNewline;