mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Change endpoint from persons to people
This commit is contained in:
43
backend/apis/nodejs/node_modules/nodemailer/lib/mime-node/le-unix.js
generated
vendored
Normal file
43
backend/apis/nodejs/node_modules/nodemailer/lib/mime-node/le-unix.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
const stream = require('stream');
|
||||
const Transform = stream.Transform;
|
||||
|
||||
/**
|
||||
* Ensures that only <LF> is used for linebreaks
|
||||
*
|
||||
* @param {Object} options Stream options
|
||||
*/
|
||||
class LeWindows extends Transform {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
// init Transform
|
||||
this.options = options || {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes dots
|
||||
*/
|
||||
_transform(chunk, encoding, done) {
|
||||
let buf;
|
||||
let lastPos = 0;
|
||||
|
||||
for (let i = 0, len = chunk.length; i < len; i++) {
|
||||
if (chunk[i] === 0x0d) {
|
||||
// \n
|
||||
buf = chunk.slice(lastPos, i);
|
||||
lastPos = i + 1;
|
||||
this.push(buf);
|
||||
}
|
||||
}
|
||||
if (lastPos && lastPos < chunk.length) {
|
||||
buf = chunk.slice(lastPos);
|
||||
this.push(buf);
|
||||
} else if (!lastPos) {
|
||||
this.push(chunk);
|
||||
}
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = LeWindows;
|
Reference in New Issue
Block a user