diff --git a/assets/highlight.css b/assets/highlight.css index 34f4edd..ef0fe74 100644 --- a/assets/highlight.css +++ b/assets/highlight.css @@ -19,14 +19,14 @@ --dark-hl-8: #4EC9B0; --light-hl-9: #098658; --dark-hl-9: #B5CEA8; - --light-hl-10: #EE0000; - --dark-hl-10: #D7BA7D; + --light-hl-10: #000000; + --dark-hl-10: #C8C8C8; --light-hl-11: #000000FF; --dark-hl-11: #D4D4D4; - --light-hl-12: #811F3F; - --dark-hl-12: #D16969; - --light-hl-13: #000000; - --dark-hl-13: #C8C8C8; + --light-hl-12: #EE0000; + --dark-hl-12: #D7BA7D; + --light-hl-13: #811F3F; + --dark-hl-13: #D16969; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } diff --git a/assets/navigation.js b/assets/navigation.js index 174f107..0fa65cd 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA8Vda5PbthX9L8pXO/E6tht7Op1Za7XJ1lpLlTZ2M4lHA1GQhCxFsiDkrNLpf++AIkW8CF5ccNpP8WTvOefidfG6hH7990jQJzF6N9qSROT8NHo2KojYj96NDvnmmNLyu/oP3+7FIR09Gz2ybDN69/LZKNmzdMNpNnr364VkfWTp5oaWgmVEsDxb5GnKst0tS2lLvD1mifxjS+2B6bJvXv3nWadYqEog/VJwSg4hAmdEkMQmP4owCYkIk6CcB0pQzvskpvluR/t5z2YesoJTIU6zQpS3Zoe0KS1jEPE4z8o8pUH8OsYjM19MHh5+Wc3mD8vVePZxOZtOWoWvhDOyVgeVw1wn//6lu3JYYAEUAND72zu469LW47cUV3pUyypOhcJomBkR58Xbv1y9VlnPwwvAaxn2MddFG8+ms8VytXxYAOqhNfZUhGYLJu0nvFvOfnjz4grAWFt6KP/KMkF5RtK/dc8Fq8ZmBZoW3qf5elZUXbPlrCi2JHHTKhBD4vWbZ6MkJWUp27ncPGflc/p0ho2UYkiCVqwCdCvpElcvf4BJHLdbyidZk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iS2PjHplGkO81DhP836dyipShIqOnAW3mjRH3wTc0DLhrBCAomnW+CJWS3G2ZYBGa02HkDM3H72izj1ISOeUu7dgfScqOknj/NMy8lS11wELEdGdj6XID1WJfBtntUebCLz4LBvLBVrXeyuWtGGPF+Z0QxLvbbulrUFirvV6d9jWnV7HThukKW/kzYb1Kbb2SD2WyR9e6R9EjWHk4IUN1kiRGV8K7vipQLdYYx0pKn/1b8lS7dLbJ9vaDyYcVm4bh3dkSTkjKfuTcjsPx94NK8aRZR/vSbY7HyzAFy4dwAhXYJE4NvzC0hwcS/VBkhycp6v+Q4+uU1Zo/JUNdU+KQuvS3virINAx/9Z9wepqTqv/QlN429uSoEnNxkXULGygxPyyW9C4iBEarj6xd5qh/QadIRExCrGaTU7LL4ymvh8isrQdwDgPFlQceYZxQUXG+uD6UN8jHPdVfptD0ZV74r5niEtE0jI3sOrR6VD1m4id6R+OneYFgM1Ld+fSWUrxWXRzBthBSSO8xIImOYeURZrhZSZPSXq0fw7RPqU820XsPw+sf+BJo5hWyXJ5Lx80jRgg30VoMDeQV8mPgfEqgD7e9kp6KXgOXYu5kHAld2JQjwgsMyhYBCYgs4K+/BdVy7hz6IUAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA8Vda5PbthX9L8pXO/E6tht7Op1Za7XJ1lpLlTZ2M4lHA1FYLbIUyYKQs0qn/70Dig+8CF5ccNpP8WTvOefidfG6hH7990TQJzF5N7knicj5afJsUhDxMHk3OeS7Y0rL7+o/fPsgDunk2eSRZbvJu5fPJskDS3ecZpN3v7Yk2yNLd1e0FCwjguXZKk9Tlu2vWUo74vtjlsg/dtQemC775tV/nvWKhaoE0q8Fp+QQInBGBEns8qMIk5CIMAnKeaAE5XxIYp7v93SY92zmISs4FeK0KER5bXZIm9IyBhFP86zMUxrEr2M8MsvV7O7ul81iebfeTBcf14v5rFP4SjgjW3VQOcx18u9fuiuHBRZAAQC9v76Buy5tPX5LcaVHdaziVCiMhpkR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XtAOIKvfmY72jFdj4lhcmbKKT21eI2XFoHYRPRiWAJuvZ74chdkEIE6HeqeXy3A8wQqnn097Px2t8YFLUjIY9kyVTg3q31kA8tOr61V/SecpolLNv3RJ8AvyDE8S7jI7XH3fGCeC9r4MDyORgy6L6Yvt2SYnBibQzx82mdhAFWNOwjJvLstNI2nD2CtV3Mocp+eIkkjfAS2juqPQr2A6phAi8hCmaCVsjSkpVCnkkOryZrQ7zUNE8Bm4PKKlKEip7UFLeaNEem4BxLkR+qhbZv46wKmgh8URfZVM6ffa+eWNKGPV6Y0x1JvLftlrYGibnWG9xhW3d6PTttkKa8kTcb1qfY2SP1WCZ//mQ4cDWGkXtK2B4yUmTB14I7frDPLdZYR4rK395bs1S79PbJdvajCYeV28bhHVlTzkjK/qTczsOxNyuKcWTZpw8k25/3ffB5pQcY4QosEseGX1iag2MlNUqSg/N01b8n7TtlhcZf2VC3pCi0Lu2NvwoCHfOv3Resrua0+i90Fu9uS4ImNRsXUbOwgRLz+2pB4yJGaLz6xN5phvYbdIZExCjEajY5Lb8wmvp+DsjSdgDjPFhRceQZxgUVGeuD63N5j3Dct/FdDkVf7on7GDguEUnL3MCqR6dD1S8T9qZ/OC5AWgA2O9ydS2cpxWfRLRlgByWN8BIrmuQcUhZphpeZPSXp0f5RQvsQ6WwXsf88sOGBJ41iWiXL5b180DRigHwXocHcQF4lPwbGqwCGeLsr6bXgOXQt5kLCldyJQQMisMygYBGYgMwK+vJfYWQJzOiFAAA=" \ No newline at end of file diff --git a/classes/factory._internal_.Interface.html b/classes/factory._internal_.Interface.html index c529a69..ffc8c4d 100644 --- a/classes/factory._internal_.Interface.html +++ b/classes/factory._internal_.Interface.html @@ -72,7 +72,7 @@ be an empty string.
unintended consequences ifrl.cursor is not also controlled.
If not using a TTY stream for input, use the 'line' event.
One possible use case would be as follows:
-const values = ['lorem ipsum', 'dolor sit amet'];
const rl = readline.createInterface(process.stdin);
const showResults = debounce(() => {
console.log(
'\n',
values.filter((val) => val.startsWith(rl.line)).join(' ')
);
}, 300);
process.stdin.on('keypress', (c, k) => {
showResults();
});
+const values = ['lorem ipsum', 'dolor sit amet'];
const rl = readline.createInterface(process.stdin);
const showResults = debounce(() => {
console.log(
'\n',
values.filter((val) => val.startsWith(rl.line)).join(' ')
);
}, 300);
process.stdin.on('keypress', (c, k) => {
showResults();
});
Readonly cursor
cursor: numberThe cursor position relative to rl.line.
diff --git a/classes/factory._internal_.ReadStream.html b/classes/factory._internal_.ReadStream.html
index 33ef2d3..c082e17 100644
--- a/classes/factory._internal_.ReadStream.html
+++ b/classes/factory._internal_.ReadStream.html
@@ -377,7 +377,7 @@ pulled out of the source, so that the data can be passed on to some other party.
has been emitted or a runtime error will be thrown.
Developers using stream.unshift() often should consider switching to
use of a Transform stream instead. See the API for stream implementers section for more information.
-// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
+// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
Unlike push, stream.unshift(chunk) will not
end the reading process by resetting the internal reading state of the stream.
diff --git a/classes/factory._internal_.Readable.html b/classes/factory._internal_.Readable.html
index 7a69559..3916032 100644
--- a/classes/factory._internal_.Readable.html
+++ b/classes/factory._internal_.Readable.html
@@ -313,7 +313,7 @@ pulled out of the source, so that the data can be passed on to some other party.
has been emitted or a runtime error will be thrown.
Developers using stream.unshift() often should consider switching to
use of a Transform stream instead. See the API for stream implementers section for more information.
-// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
+// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
Unlike push, stream.unshift(chunk) will not
end the reading process by resetting the internal reading state of the stream.
diff --git a/classes/factory._internal_.internal-1.Duplex.html b/classes/factory._internal_.internal-1.Duplex.html
index 48e40c8..ef10d7d 100644
--- a/classes/factory._internal_.internal-1.Duplex.html
+++ b/classes/factory._internal_.internal-1.Duplex.html
@@ -363,7 +363,7 @@ pulled out of the source, so that the data can be passed on to some other party.
has been emitted or a runtime error will be thrown.
Developers using stream.unshift() often should consider switching to
use of a Transform stream instead. See the API for stream implementers section for more information.
-// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
+// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
Unlike push, stream.unshift(chunk) will not
end the reading process by resetting the internal reading state of the stream.
diff --git a/classes/factory._internal_.internal-1.PassThrough.html b/classes/factory._internal_.internal-1.PassThrough.html
index d1863a1..e8b87f5 100644
--- a/classes/factory._internal_.internal-1.PassThrough.html
+++ b/classes/factory._internal_.internal-1.PassThrough.html
@@ -359,7 +359,7 @@ pulled out of the source, so that the data can be passed on to some other party.
has been emitted or a runtime error will be thrown.
Developers using stream.unshift() often should consider switching to
use of a Transform stream instead. See the API for stream implementers section for more information.
-// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
+// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
Unlike push, stream.unshift(chunk) will not
end the reading process by resetting the internal reading state of the stream.
diff --git a/classes/factory._internal_.internal-1.Transform.html b/classes/factory._internal_.internal-1.Transform.html
index 2690bad..9779f05 100644
--- a/classes/factory._internal_.internal-1.Transform.html
+++ b/classes/factory._internal_.internal-1.Transform.html
@@ -366,7 +366,7 @@ pulled out of the source, so that the data can be passed on to some other party.
has been emitted or a runtime error will be thrown.
Developers using stream.unshift() often should consider switching to
use of a Transform stream instead. See the API for stream implementers section for more information.
-// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
+// Pull off a header delimited by \n\n.
// Use unshift() if we get too much.
// Call the callback with (error, header, stream).
const { StringDecoder } = require('string_decoder');
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
const decoder = new StringDecoder('utf8');
let header = '';
function onReadable() {
let chunk;
while (null !== (chunk = stream.read())) {
const str = decoder.write(chunk);
if (str.includes('\n\n')) {
// Found the header boundary.
const split = str.split(/\n\n/);
header += split.shift();
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// Remove the 'readable' listener before unshifting.
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
// Now the body of the message can be read from the stream.
callback(null, header, stream);
return;
}
// Still reading the header.
header += str;
}
}
}
Unlike push, stream.unshift(chunk) will not
end the reading process by resetting the internal reading state of the stream.
diff --git a/functions/factory.buildDestinationFile.html b/functions/factory.buildDestinationFile.html
index c8bc4e0..2b3620a 100644
--- a/functions/factory.buildDestinationFile.html
+++ b/functions/factory.buildDestinationFile.html
@@ -1,2 +1,2 @@
buildDestinationFile | @foxxmd/logging Docs Function buildDestinationFile
- build
Destination File(level, options): LogLevelStreamEntry Creates a LogLevelStreamEntry stream that writes to a static file at or above the minimum level
-Parameters
- level: false | "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug"
- options: FileDestination
Returns LogLevelStreamEntry
Generated using TypeDoc
\ No newline at end of file
+
Parameters
- level: false | "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug"
- options: FileDestination
Returns LogLevelStreamEntry
Generated using TypeDoc
Since
v0.1.98