Protected
signalStatic
captureValue: boolean
+Protected
signalStatic
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
'error'
listener is installed.
The cursor is closed and all remaining locally buffered documents have been iterated.
-The cursor has no id until it receives a response from the initial cursor creating command.
+A killCursors
command was attempted on this cursor.
+
A killCursors
command was attempted on this cursor.
This is performed if the cursor id is non zero.
Optional
[captureRest
...args: AnyRestOptional
[captureRest
...args: AnyRestAdd a cursor flag to the cursor
The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.
The flag boolean value.
-Alias for emitter.on(eventName, listener)
.
Alias for emitter.on(eventName, listener)
.
Alias for emitter.on(eventName, listener)
.
Set the batch size for the cursor.
The number of documents to return per batch. See command documentation.
-Abstract
cloneReturns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance
-Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
+
Abstract
cloneReturns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance
+Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -129,10 +129,10 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to EventEmitter.defaultMaxListeners.
Returns the number of listeners listening for the event named eventName
.
+
Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
v10.0.0
@@ -316,7 +316,7 @@Removes all listeners, or those of the specified eventName
.
It is bad practice to remove listeners added elsewhere in the code,
particularly when the EventEmitter
instance was created by some other
component or module (e.g. sockets or file streams).
By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Returns a reference to the EventEmitter
, so that calls can be chained.
Optional
options: CursorStreamOptionsReturns an array of documents. The caller is responsible for making sure that there +
Optional
options: CursorStreamOptionsReturns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.
-Set the ReadPreference for the cursor.
-Set the ReadPreference for the cursor.
+Set the ReadPreference for the cursor.
+Set the ReadPreference for the cursor.
The new read preference for the cursor.
-Static
addStatic
addExperimental
Listens once to the abort
event on the provided signal
.
Listening to the abort
event on abort signals is unsafe and may
lead to resource leaks since another third party with the signal can
call e.stopImmediatePropagation()
. Unfortunately Node.js cannot change
diff --git a/docs/Next/classes/AggregationCursor.html b/docs/Next/classes/AggregationCursor.html
index ec491105196..e5baa976d92 100644
--- a/docs/Next/classes/AggregationCursor.html
+++ b/docs/Next/classes/AggregationCursor.html
@@ -74,7 +74,7 @@
once
set
An alias for AbstractCursor.close|AbstractCursor.close().
-Readonly
pipelineProtected
signalStatic
captureValue: boolean
+Readonly
pipelineProtected
signalStatic
captureValue: boolean
Change the default captureRejections
option on all new EventEmitter
objects.
Static
Readonly
captureValue: Symbol.for('nodejs.rejection')
'error'
listener is installed.
The cursor is closed and all remaining locally buffered documents have been iterated.
-The cursor has no id until it receives a response from the initial cursor creating command.
+A killCursors
command was attempted on this cursor.
+
A killCursors
command was attempted on this cursor.
This is performed if the cursor id is non zero.
Optional
[captureRest
...args: AnyRestOptional
[captureRest
...args: AnyRestAdd a cursor flag to the cursor
The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.
The flag boolean value.
-Alias for emitter.on(eventName, listener)
.
Alias for emitter.on(eventName, listener)
.
Alias for emitter.on(eventName, listener)
.
v0.1.26
@@ -133,10 +133,10 @@Set the batch size for the cursor.
The number of documents to return per batch. See command documentation.
-Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance
+Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance
Synchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
+
Optional
options: { Optional
timeoutMS?: numberSynchronously calls each of the listeners registered for the event named eventName
, in the order they were registered, passing the supplied arguments
to each.
Returns true
if the event had listeners, false
otherwise.
import { EventEmitter } from 'node:events';
const myEmitter = new EventEmitter();
// First listener
myEmitter.on('event', function firstListener() {
console.log('Helloooo! first listener');
});
// Second listener
myEmitter.on('event', function secondListener(arg1, arg2) {
console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
});
// Third listener
myEmitter.on('event', function thirdListener(...args) {
const parameters = args.join(', ');
console.log(`event with parameters ${parameters} in third listener`);
});
console.log(myEmitter.listeners('event'));
myEmitter.emit('event', 1, 2, 3, 4, 5);
// Prints:
// [
// [Function: firstListener],
// [Function: secondListener],
// [Function: thirdListener]
// ]
// Helloooo! first listener
// event with parameters 1, 2 in second listener
// event with parameters 1, 2, 3, 4, 5 in third listener
@@ -159,12 +159,12 @@ Example- (doc): boolean | void
Parameters
- doc: TSchema
Returns boolean | void
Add a geoNear stage to the aggregation pipeline
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to EventEmitter.defaultMaxListeners.
Add a group stage to the aggregation pipeline
-Add a limit stage to the aggregation pipeline
+Returns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
Add a match stage to the aggregation pipeline
Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
Alias for emitter.removeListener()
.
v10.0.0
@@ -363,7 +363,7 @@Add a redact stage to the aggregation pipeline
+Optional
number: numberAdd a redact stage to the aggregation pipeline
Removes all listeners, or those of the specified eventName
.
It is bad practice to remove listeners added elsewhere in the code,
particularly when the EventEmitter
instance was created by some other
@@ -454,7 +454,7 @@
Protected
resolveOptional
verbosity: ExplainVerbosityLike | ExplainCommandOptions | { Optional
options: { Optional
timeoutMS?: numberOptional
explain?: ExplainVerbosityLike | ExplainCommandOptionsOptional
timeout?: { Optional
timeoutMS?: numberBy default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set to Infinity
(or 0
) to indicate an unlimited number of listeners.
Add a sort stage to the aggregation pipeline
-Optional
options: CursorStreamOptionsOptional
options: CursorStreamOptionsReturns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.
-Add a unwind stage to the aggregation pipeline
+Add a unwind stage to the aggregation pipeline
Set the ReadPreference for the cursor.
-Set the ReadPreference for the cursor.
+Set the ReadPreference for the cursor.
The new read preference for the cursor.
-Static
addStatic
addExperimental
Listens once to the abort
event on the provided signal
.
Listening to the abort
event on abort signals is unsafe and may
lead to resource leaks since another third party with the signal can
call e.stopImmediatePropagation()
. Unfortunately Node.js cannot change
diff --git a/docs/Next/classes/BSON.BSONError.html b/docs/Next/classes/BSON.BSONError.html
index f7991f8bfe9..d3851bef7d4 100644
--- a/docs/Next/classes/BSON.BSONError.html
+++ b/docs/Next/classes/BSON.BSONError.html
@@ -7,7 +7,7 @@
Optional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stackStatic
captureStatic
isBSONErrorAll errors thrown from the BSON library inherit from BSONError
.
diff --git a/docs/Next/classes/BSON.BSONOffsetError.html b/docs/Next/classes/BSON.BSONOffsetError.html
index 8d57847ce6f..d5f09874113 100644
--- a/docs/Next/classes/BSON.BSONOffsetError.html
+++ b/docs/Next/classes/BSON.BSONOffsetError.html
@@ -8,7 +8,7 @@
Experimental
Optional
options: { Optional
cause?: unknownOptional
Experimental
causeExperimental
messageExperimental
offsetOptional
Experimental
stackStatic
Optional
prepareOptional override for formatting stack traces
+Experimental
Optional
options: { Optional
cause?: unknownOptional
Experimental
causeExperimental
messageExperimental
offsetOptional
Experimental
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
Experimental
stackExperimental
Static
captureStatic
isBSONErrorAll errors thrown from the BSON library inherit from BSONError
.
diff --git a/docs/Next/classes/BSON.BSONRuntimeError.html b/docs/Next/classes/BSON.BSONRuntimeError.html
index fdb3607dba6..6ff9b813e7a 100644
--- a/docs/Next/classes/BSON.BSONRuntimeError.html
+++ b/docs/Next/classes/BSON.BSONRuntimeError.html
@@ -7,7 +7,7 @@
Optional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stackStatic
captureStatic
isBSONErrorAll errors thrown from the BSON library inherit from BSONError
.
diff --git a/docs/Next/classes/BSON.BSONVersionError.html b/docs/Next/classes/BSON.BSONVersionError.html
index 32f4e34a69b..646f2fc16d1 100644
--- a/docs/Next/classes/BSON.BSONVersionError.html
+++ b/docs/Next/classes/BSON.BSONVersionError.html
@@ -7,7 +7,7 @@
Optional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stackStatic
captureStatic
isBSONErrorAll errors thrown from the BSON library inherit from BSONError
.
diff --git a/docs/Next/classes/BSON.Binary.html b/docs/Next/classes/BSON.Binary.html
index cfaf73c0e3f..a849fe15ae4 100644
--- a/docs/Next/classes/BSON.Binary.html
+++ b/docs/Next/classes/BSON.Binary.html
@@ -39,7 +39,7 @@
Create a new Binary instance.
Optional
buffer: BinarySequencea buffer object containing the binary data.
Optional
subType: numberthe option binary type.
-The bytes of the Binary value.
+The bytes of the Binary value.
The format of a Binary value in BSON is defined as:
binary ::= int32 subtype (byte*)
@@ -85,35 +85,35 @@
If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify
Optional
depth: numberOptional
options: unknownOptional
inspect: InspectFnIf this Binary represents a Packed bit Vector (binary.buffer[0] === Binary.VECTOR_TYPE.PackedBit
),
+
If this Binary represents a Packed bit Vector (binary.buffer[0] === Binary.VECTOR_TYPE.PackedBit
),
returns a copy of the bit unpacked into a new Int8Array.
Use toPackedBits
to get the bits still in packed form.
If the Binary is not a Vector, or the datatype is not PackedBit, an error is thrown.
-If this Binary represents packed bit Vector (binary.buffer[0] === Binary.VECTOR_TYPE.PackedBit
),
returns a copy of the bytes that are packed bits.
Use toBits
to get the unpacked bits.
If the Binary is not a Vector, or the datatype is not PackedBit, an error is thrown.
-Writes a buffer to the binary.
a string or buffer to be written to the Binary BSON object.
specify the binary of where to write the content.
Static
createStatic
createStatic
fromStatic
fromStatic
from
An alias for AbstractCursor.close|AbstractCursor.close().
-