content large_stringlengths 3 20.5k | url large_stringlengths 53 192 ⌀ | branch large_stringclasses 4
values | source large_stringclasses 51
values | embeddings listlengths 384 384 | score float64 -0.21 0.65 |
|---|---|---|---|---|---|
internal modules that are not exported cannot be imported through the package resolution, unless using an absolute URL. ### `ERR\_PARSE\_ARGS\_INVALID\_OPTION\_VALUE` When `strict` set to `true`, thrown by [`util.parseArgs()`][] if a {boolean} value is provided for an option of type {string}, or if a {string} value is ... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.06401240825653076,
-0.007341902703046799,
-0.04818977788090706,
-0.019419798627495766,
0.02295103669166565,
-0.0813230499625206,
0.012965226545929909,
0.07080788910388947,
-0.08067887276411057,
-0.038646019995212555,
0.028069525957107544,
-0.028471168130636215,
0.0063033136539161205,
0.... | -0.005283 |
was not running. This applies to all instances of `net.Server`, including HTTP, HTTPS, and HTTP/2 `Server` instances. ### `ERR\_SINGLE\_EXECUTABLE\_APPLICATION\_ASSET\_NOT\_FOUND` A key was passed to single executable application APIs to identify an asset, but no match could be found. ### `ERR\_SOCKET\_ALREADY\_BOUND` ... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.023257935419678688,
0.012340298853814602,
-0.03283964470028877,
-0.02306581661105156,
-0.05659149959683418,
-0.08922522515058517,
-0.05458275228738785,
0.04661823809146881,
-0.012109104543924332,
0.015073026530444622,
-0.01928550750017166,
0.008529969491064548,
-0.020627684891223907,
-0... | 0.057632 |
`err.info` object property with additional details. ### `ERR\_TEST\_FAILURE` This error represents a failed test. Additional information about the failure is available via the `cause` property. The `failureType` property specifies what the test was doing when the failure occurred. ### `ERR\_TLS\_ALPN\_CALLBACK\_INVALID... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.09185254573822021,
0.08121184259653091,
-0.010064109228551388,
0.07237330824136734,
-0.005893430206924677,
-0.10177572071552277,
0.012394847348332405,
-0.055876292288303375,
0.08667454123497009,
-0.016567206010222435,
0.02308955229818821,
-0.04313161224126816,
0.03591654822230339,
0.016... | -0.022763 |
received. ### `ERR\_UNHANDLED\_ERROR` An unhandled error occurred (for instance, when an `'error'` event is emitted by an [`EventEmitter`][] but an `'error'` handler is not registered). ### `ERR\_UNKNOWN\_BUILTIN\_MODULE` Used to identify a specific kind of internal Node.js error that should not typically be triggered ... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.09774889796972275,
-0.012070049531757832,
-0.02315704897046089,
0.06163082271814346,
0.06035728380084038,
-0.048547279089689255,
0.006995283532887697,
0.047035057097673416,
0.020406261086463928,
0.01030896045267582,
-0.0011671605752781034,
-0.028391512110829353,
-0.002080215374007821,
0... | 0.139815 |
running with `--jitless`). ### `ERR\_WEBASSEMBLY\_RESPONSE` The `Response` that has been passed to `WebAssembly.compileStreaming` or to `WebAssembly.instantiateStreaming` is not a valid WebAssembly response. ### `ERR\_WORKER\_INIT\_FAILED` The `Worker` initialization failed. ### `ERR\_WORKER\_INVALID\_EXEC\_ARGV` The `... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.09210236370563507,
-0.008625946938991547,
-0.04516318067908287,
0.004050249699503183,
0.0033273093868047,
-0.1085641086101532,
0.015100126154720783,
-0.0027741568628698587,
-0.08123333752155304,
0.03146129101514816,
0.005273817107081413,
-0.0729682669043541,
-0.038160551339387894,
0.072... | 0.096268 |
must only be sent \_prior\_ to calling the `Http2Stream.prototype.respond()` method. ### `ERR\_HTTP2\_STREAM\_CLOSED` Used when an action has been performed on an HTTP/2 Stream that has already been closed. ### `ERR\_HTTP\_INVALID\_CHAR` Used when an invalid character is found in an HTTP response status message (reason... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.10045605152845383,
-0.0146251879632473,
0.04343399778008461,
0.010427659377455711,
0.08494366705417633,
-0.01657007448375225,
-0.044987332075834274,
0.059792935848236084,
0.01343624759465456,
0.015375451184809208,
-0.021438026800751686,
-0.03125457093119621,
-0.016583548858761787,
0.041... | 0.036343 |
when attempting to start the loop. ### `ERR\_NAPI\_TSFN\_STOP\_IDLE\_LOOP` Once no more items are left in the queue, the idle loop must be suspended. This error indicates that the idle loop has failed to stop. ### `ERR\_NO\_LONGER\_SUPPORTED` A Node.js API was called in an unsupported manner, such as `Buffer.write(stri... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.0411507673561573,
0.02391556091606617,
-0.10070480406284332,
0.03449006751179695,
0.04831084981560707,
-0.07218312472105026,
-0.0012229530839249492,
0.0336964875459671,
0.03199010714888573,
0.013878562487661839,
-0.007214408367872238,
0.06103237345814705,
-0.04075440391898155,
-0.057978... | 0.140213 |
the issuer is not included in the trusted certificate list. #### `DEPTH\_ZERO\_SELF\_SIGNED\_CERT` The passed certificate is self-signed and the same certificate cannot be found in the list of trusted certificates. #### `SELF\_SIGNED\_CERT\_IN\_CHAIN` The certificate’s issuer is not known. This is the case if the issue... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.08773574233055115,
0.04169823229312897,
-0.01555235031992197,
0.0022198171354830265,
0.024639662355184555,
-0.07651331275701523,
-0.029551716521382332,
0.07474270462989807,
-0.013854569755494595,
-0.049751635640859604,
0.08936844766139984,
-0.08757707476615906,
0.10686175525188446,
0.04... | -0.054702 |
stream.md#readableunshiftchunk-encoding [`stream.write()`]: stream.md#writablewritechunk-encoding-callback [`subprocess.kill()`]: child\_process.md#subprocesskillsignal [`subprocess.send()`]: child\_process.md#subprocesssendmessage-sendhandle-options-callback [`url.parse()`]: url.md#urlparseurlstring-parsequerystring-s... | https://github.com/nodejs/node/blob/main/doc/api/errors.md | main | nodejs | [
-0.03234916180372238,
-0.0028496794402599335,
-0.08819940686225891,
-0.06454174965620041,
-0.00007034562440821901,
-0.07549318671226501,
-0.06577949225902557,
0.06419529765844345,
-0.01528676226735115,
0.024329619482159615,
-0.09875369071960449,
-0.020910369232296944,
-0.03770095109939575,
... | -0.013802 |
# Modules: CommonJS modules > Stability: 2 - Stable CommonJS modules are the original way to package JavaScript code for Node.js. Node.js also supports the [ECMAScript modules][] standard used by browsers and other JavaScript runtimes. In Node.js, each file is treated as a separate module. For example, consider a file ... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.06691720336675644,
-0.03138328716158867,
-0.06275985389947891,
0.035192977637052536,
0.10024439543485641,
-0.07523903250694275,
-0.021385211497545242,
0.07603301107883453,
0.04074399173259735,
-0.08752841502428055,
-0.003419172950088978,
0.10602999478578568,
0.014731495641171932,
-0.014... | 0.118993 |
## Package manager tips The semantics of the Node.js `require()` function were designed to be general enough to support reasonable directory structures. Package manager programs such as `dpkg`, `rpm`, and `npm` will hopefully find it possible to build native packages from Node.js modules without modification. In the fo... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.10442744940519333,
-0.06640636175870895,
0.0916920080780983,
0.003621893236413598,
0.07621343433856964,
-0.03438827022910118,
-0.027939964085817337,
-0.007401647511869669,
0.02466578036546707,
-0.017280125990509987,
0.0022962347138673067,
0.0668884888291359,
-0.009393001906573772,
0.009... | 0.000402 |
require('./distance.mjs'); console.log(distance); // [Module: null prototype] { // distance: [Function: distance] // } const point = require('./point.mjs'); console.log(point); // [Module: null prototype] { // default: [class Point], // \_\_esModule: true, // } ``` For interoperability with existing tools that convert ... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.10021109133958817,
-0.017524758353829384,
-0.004602620843797922,
0.0008647192153148353,
0.05244462937116623,
-0.0396546795964241,
-0.013970627449452877,
0.050028156489133835,
0.04362010210752487,
-0.06002826988697052,
0.0412687286734581,
-0.010219259187579155,
-0.01206926628947258,
0.01... | 0.140436 |
at path Y 1. If X is a core module, a. return the core module b. STOP 2. If X begins with '/' a. set Y to the file system root 3. If X is equal to '.', or X begins with './', '/' or '../' a. LOAD\_AS\_FILE(Y + X) b. LOAD\_AS\_DIRECTORY(Y + X) c. THROW "not found" 4. If X begins with '#' a. LOAD\_PACKAGE\_IMPORTS(X, dir... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.05144181475043297,
-0.05566444993019104,
0.0006138062453828752,
-0.013589381240308285,
0.12090254575014114,
-0.04953944683074951,
0.026083171367645264,
0.03994087129831314,
-0.036409199237823486,
-0.055972035974264145,
0.060260046273469925,
-0.040499474853277206,
0.005229123402386904,
-... | 0.098686 |
a file, return. 3. Parse DIR/NAME/package.json, and look for "exports" field. 4. If "exports" is null or undefined, return. 5. If `--no-require-module` is not enabled a. let CONDITIONS = ["node", "require", "module-sync"] b. Else, let CONDITIONS = ["node", "require"] 6. let MATCH = PACKAGE\_EXPORTS\_RESOLVE(pathToFileU... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.08045777678489685,
-0.037925705313682556,
0.06650741398334503,
0.007921126671135426,
0.06750266999006271,
-0.04516439512372017,
-0.04194438084959984,
0.021111061796545982,
-0.003370012389495969,
-0.005098660476505756,
0.03812146931886673,
-0.003333384869620204,
-0.05150897055864334,
0.0... | 0.060129 |
`node:` prefix are: \* [`node:ffi`][] \* [`node:sea`][] \* [`node:sqlite`][] \* [`node:test`][] \* [`node:test/reporters`][] The list of these modules is exposed in [`module.builtinModules`][], including the prefix. ## Cycles When there are circular `require()` calls, a module might not have finished executing when it ... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.061572007834911346,
-0.017936525866389275,
-0.0352221354842186,
0.03943257033824921,
0.06383860111236572,
-0.07781650125980377,
0.002041031839326024,
-0.012957528233528137,
0.02413494512438774,
-0.05539676547050476,
0.023185987025499344,
0.03617420420050621,
-0.01249755546450615,
-0.010... | 0.066031 |
example, if there was no [`package.json`][] file in the previous example, then `require('./some-library')` would attempt to load: \* `./some-library/index.js` \* `./some-library/index.node` If these attempts fail, then Node.js will report the entire module as missing with the default error: ```console Error: Cannot fin... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.09428704530000687,
-0.03630268946290016,
0.01668819785118103,
0.027338506653904915,
0.13147297501564026,
-0.022330058738589287,
-0.023891203105449677,
0.027057237923145294,
-0.00032245711190626025,
-0.06839500367641449,
0.02399430423974991,
0.04926947504281998,
0.009402195923030376,
0.0... | 0.042647 |
absolute filename and directory path. ## The module scope ### `\_\_dirname` \* Type: {string} The directory name of the current module. This is the same as the [`path.dirname()`][] of the [`\_\_filename`][]. Example: running `node example.js` from `/Users/mjr` ```js console.log(\_\_dirname); // Prints: /Users/mjr conso... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.0595102533698082,
0.006179925985634327,
0.012482338584959507,
0.0219360813498497,
0.08134417980909348,
-0.06051004305481911,
-0.009520073421299458,
0.12951985001564026,
0.029038159176707268,
-0.05477970838546753,
0.060901325196027756,
0.07914560288190842,
0.015033592469990253,
0.0225844... | 0.102195 |
Node.js program, or compiling them to JavaScript ahead of time. Avoid using `require.extensions`. Use could cause subtle bugs and resolving the extensions gets slower with each registered extension. #### `require.main` \* Type: {module | undefined} The `Module` object representing the entry script loaded when the Node.... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.025262799113988876,
0.007324833422899246,
0.012944276444613934,
0.04757390543818474,
0.10217656940221786,
-0.04549189656972885,
-0.06959661096334457,
0.08664890378713608,
0.042971644550561905,
-0.023595279082655907,
-0.04130573570728302,
0.09221208840608597,
-0.018194735050201416,
-0.01... | 0.028146 |
// Exported from require of module exports = { hello: false }; // Not exported, only available in the module ``` When the `module.exports` property is being completely replaced by a new object, it is common to also reassign `exports`: ```js module.exports = exports = function Constructor() { // ... etc. }; ``` To illus... | https://github.com/nodejs/node/blob/main/doc/api/modules.md | main | nodejs | [
-0.09394863247871399,
0.015125527046620846,
0.02888699248433113,
0.0842551589012146,
0.0604422464966774,
-0.02420978806912899,
-0.016165737062692642,
-0.006370773538947105,
0.060847148299217224,
-0.04855085909366608,
0.02077168971300125,
0.06362546235322952,
-0.049639374017715454,
0.016575... | 0.060339 |
# Query string > Stability: 2 - Stable The `node:querystring` module provides utilities for parsing and formatting URL query strings. It can be accessed using: ```js const querystring = require('node:querystring'); ``` `querystring` is more performant than {URLSearchParams} but is not a standardized API. Use {URLSearch... | https://github.com/nodejs/node/blob/main/doc/api/querystring.md | main | nodejs | [
-0.048644568771123886,
0.027213305234909058,
0.0035046301782131195,
0.07160233706235886,
-0.057916104793548584,
-0.02534446492791176,
-0.038168713450431824,
0.08668124675750732,
0.034214846789836884,
-0.06537166982889175,
-0.08898723125457764,
0.05048222094774246,
0.019994717091321945,
-0.... | 0.084473 |
The `querystring.unescape()` method performs decoding of URL percent-encoded characters on the given `str`. The `querystring.unescape()` method is used by `querystring.parse()` and is generally not expected to be used directly. It is exported primarily to allow application code to provide a replacement decoding impleme... | https://github.com/nodejs/node/blob/main/doc/api/querystring.md | main | nodejs | [
-0.047207314521074295,
0.024064015597105026,
-0.013092556037008762,
0.05069391801953316,
-0.05869501456618309,
-0.07120076566934586,
-0.02822227217257023,
0.036380913108587265,
0.07973242551088333,
-0.07109981775283813,
-0.022132284939289093,
0.04757248982787132,
-0.03349994122982025,
-0.0... | 0.023263 |
# Timers > Stability: 2 - Stable The `timer` module exposes a global API for scheduling functions to be called at some future period of time. Because the timer functions are globals, there is no need to call `require('node:timers')` to use the API. The timer functions within Node.js implement a similar API as the timer... | https://github.com/nodejs/node/blob/main/doc/api/timers.md | main | nodejs | [
-0.09082208573818207,
0.027707358822226524,
0.01752338372170925,
0.10213161259889603,
0.05979125201702118,
-0.045130930840969086,
0.007935401983559132,
0.0034078152384608984,
0.08811315894126892,
-0.01686895452439785,
-0.03673655167222023,
0.07841208577156067,
-0.0355905257165432,
-0.01711... | 0.13158 |
running, the process may exit before the `Timeout` object's callback is invoked. Calling `timeout.unref()` multiple times will have no effect. ### `timeout[Symbol.toPrimitive]()` \* Returns: {integer} a number that can be used to reference this `timeout` Coerce a `Timeout` to a primitive. The primitive can be used to c... | https://github.com/nodejs/node/blob/main/doc/api/timers.md | main | nodejs | [
-0.048878319561481476,
0.047176092863082886,
-0.0020248843356966972,
0.07504799216985703,
0.0541132315993309,
-0.030131125822663307,
0.0020039239898324013,
0.0034817024134099483,
0.10969088971614838,
-0.01395130343735218,
-0.06321832537651062,
0.10032439976930618,
-0.05321147292852402,
-0.... | 0.137802 |
used to cancel the timer and prevent it from triggering. For the promisified variants of [`setImmediate()`][] and [`setTimeout()`][], an [`AbortController`][] may be used to cancel the timer. When canceled, the returned Promises will be rejected with an `'AbortError'`. For `setImmediate()`: ```mjs import { setImmediate... | https://github.com/nodejs/node/blob/main/doc/api/timers.md | main | nodejs | [
-0.06759874522686005,
0.05300980806350708,
0.022177787497639656,
0.08902863413095474,
0.04054546728730202,
0.041108570992946625,
0.00176405836828053,
0.07190489023923874,
0.09765051305294037,
-0.003147051203995943,
0.01618345081806183,
0.02522881329059601,
0.02424660511314869,
-0.039044197... | 0.096801 |
interval of `delay` ms. If `ref` is `true`, you need to call `next()` of async iterator explicitly or implicitly to keep the event loop alive. \* `delay` {number} The number of milliseconds to wait between iterations. \*\*Default:\*\* `1`. \* `value` {any} A value with which the iterator returns. \* `options` {Object} ... | https://github.com/nodejs/node/blob/main/doc/api/timers.md | main | nodejs | [
-0.03943680226802826,
0.0513380765914917,
0.007953829132020473,
0.09637946635484695,
-0.018323002383112907,
0.0016992627643048763,
0.008567307144403458,
0.051167454570531845,
0.08402968943119049,
-0.06485089659690857,
-0.03827589750289917,
0.009416049346327782,
-0.021657198667526245,
-0.03... | 0.05271 |
# Diagnostics Channel > Stability: 2 - Stable The `node:diagnostics\_channel` module provides an API to create named channels to report arbitrary message data for diagnostics purposes. It can be accessed using: ```mjs import diagnostics\_channel from 'node:diagnostics\_channel'; ``` ```cjs const diagnostics\_channel = ... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.009241531603038311,
-0.025852924212813377,
-0.0759783387184143,
0.07378707826137543,
0.027643177658319473,
-0.059041038155555725,
0.0448746532201767,
0.10415211319923401,
-0.013999151065945625,
-0.05216115340590477,
-0.015063857659697533,
0.009031165391206741,
0.05785708501935005,
0.043... | 0.177936 |
onMessage)` \* `name` {string|symbol} The channel name \* `onMessage` {Function} The previous subscribed handler to remove \* Returns: {boolean} `true` if the handler was found, `false` otherwise. Remove a message handler previously registered to this channel with [`diagnostics\_channel.subscribe(name, onMessage)`][]. ... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.015696672722697258,
0.012686003930866718,
0.06568972021341324,
0.07390378415584564,
0.06399331241846085,
-0.051089271903038025,
0.08446679264307022,
-0.024296069517731667,
0.051017872989177704,
-0.04683621972799301,
-0.01111337635666132,
-0.010892672464251518,
0.03546389937400818,
0.053... | 0.106469 |
some: 'message', }); ``` ```cjs const diagnostics\_channel = require('node:diagnostics\_channel'); const channel = diagnostics\_channel.channel('my-channel'); channel.publish({ some: 'message', }); ``` #### `channel.subscribe(onMessage)` \* `onMessage` {Function} The handler to receive channel messages \* `message` {an... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
0.02370205521583557,
-0.03242191672325134,
0.01918470486998558,
0.08209630101919174,
-0.009117498062551022,
-0.0742034763097763,
0.055302441120147705,
0.028648482635617256,
0.018616624176502228,
-0.036229703575372696,
-0.010132282972335815,
0.0032194831874221563,
0.05687125399708748,
0.014... | 0.139742 |
The context applied to the store should be accessible in any async code which continues from execution which began during the given function, however there are some situations in which [context loss][] may occur. ```mjs import diagnostics\_channel from 'node:diagnostics\_channel'; import { AsyncLocalStorage } from 'nod... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.01126196887344122,
0.02703583799302578,
-0.03875700384378433,
0.1038958802819252,
-0.005414054729044437,
-0.03263045847415924,
0.04336593672633171,
0.03243958204984665,
0.03977939113974571,
-0.04751009866595268,
0.03736848384141922,
0.009001324884593487,
0.01273820735514164,
-0.02068348... | 0.038232 |
asyncStart message }, asyncEnd(message) { // Handle asyncEnd message }, error(message) { // Handle error message }, }); ``` ```cjs const diagnostics\_channel = require('node:diagnostics\_channel'); const channels = diagnostics\_channel.tracingChannel('my-channel'); channels.subscribe({ start(message) { // Handle start ... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.04746121168136597,
-0.0238203052431345,
-0.029673663899302483,
0.10457850247621536,
0.022291474044322968,
-0.06406287103891373,
-0.0036541768349707127,
0.015158803202211857,
0.023712847381830215,
-0.08223511278629303,
-0.03290392830967903,
0.004994590301066637,
-0.004165994934737682,
0.... | 0.076354 |
[`start` event][] and [`end` event][] around the synchronous portion of the function execution, and will produce an [`asyncStart` event][] and [`asyncEnd` event][] when the returned promise is resolved or rejected. It may also produce an [`error` event][] if the given function throws an error or the returned promise is... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.07426586002111435,
-0.005296186078339815,
-0.03615892678499222,
0.08114824444055557,
0.04662899672985077,
-0.0825878381729126,
0.012230332009494305,
0.04780987277626991,
0.03842844441533089,
-0.025844432413578033,
-0.01158942375332117,
0.036989688873291016,
-0.004135902505367994,
-0.012... | 0.100217 |
data.span = span; return span; }); // Then asyncStart can restore from that data it stored previously channels.asyncStart.bindStore(myStore, (data) => { return data.span; }); ``` ```cjs const diagnostics\_channel = require('node:diagnostics\_channel'); const { AsyncLocalStorage } = require('node:async\_hooks'); const c... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.03056575357913971,
-0.02121148072183132,
-0.061124663800001144,
0.1200312003493309,
-0.04725963622331619,
0.011098550632596016,
0.038905106484889984,
0.02367287129163742,
-0.030940618366003036,
-0.02286571078002453,
-0.03271910175681114,
0.06177792325615883,
-0.024064676836133003,
-0.04... | -0.012113 |
Function to wrap a trace around \* `thisArg` {any} The receiver to be used for the function call \* `...args` {any} Optional arguments to pass to the function \* Returns: {any} The return value of the given function Trace a synchronous function call. This will produce a `start` event and `end` event around the executio... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.023646099492907524,
0.028747007250785828,
0.006466783117502928,
0.0679425522685051,
-0.04599040746688843,
-0.055164359509944916,
0.08307457715272903,
0.043869949877262115,
0.02651478908956051,
-0.05628366023302078,
-0.05743000656366348,
0.028225474059581757,
-0.057302866131067276,
0.002... | 0.119229 |
`start`, `end`, `asyncStart`, `asyncEnd`, and `error`. A single traceable action will share the same event object between all events, this can be helpful for managing correlation through a weakmap. These event objects will be extended with `result` or `error` values when the task "completes". In the case of a synchrono... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.07561028003692627,
-0.06171111762523651,
-0.049511462450027466,
0.09172523766756058,
0.027865448966622353,
-0.07639304548501968,
-0.013907169923186302,
0.008992676623165607,
0.009339449927210808,
-0.010364141315221786,
-0.011722767725586891,
0.050305284559726715,
-0.007845457643270493,
... | 0.036509 |
an error is thrown in the synchronous portion of the traced function the error will be assigned to the `error` field of the event and the `error` event will be triggered. If an error is received asynchronously through a callback or promise rejection it will also be assigned to the `error` field of the event and trigger... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.04195781424641609,
-0.016530072316527367,
-0.012130542658269405,
0.1135641410946846,
0.07327920198440552,
-0.07260725647211075,
0.031068703159689903,
0.009352602064609528,
0.05597303435206413,
-0.022580042481422424,
-0.05214555189013481,
0.020541802048683167,
-0.016384992748498917,
-0.0... | 0.067905 |
retrieved using the `stream.rstCode` property. ##### Event: `'http2.server.stream.created'` \* `stream` {ServerHttp2Stream} \* `headers` {HTTP/2 Headers Object} Emitted when a stream is created on the server. ##### Event: `'http2.server.stream.start'` \* `stream` {ServerHttp2Stream} \* `headers` {HTTP/2 Headers Object}... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.036830734461545944,
0.021786080673336983,
-0.023840639740228653,
0.026098595932126045,
0.07304045557975769,
-0.05994104966521263,
-0.044632792472839355,
0.019420981407165527,
0.057059887796640396,
0.005823592189699411,
-0.04488828405737877,
-0.026601551100611687,
0.020171107724308968,
0... | 0.022477 |
`execPath` {string} \* `args` {string\[]} \* `env` {string\[]} Emitted when [`process.execve()`][] is invoked. #### Web Locks > Stability: 1 - Experimental These channels are emitted for each [`locks.request()`][] call. See [`worker\_threads.locks`][] for details on Web Locks. ##### Event: `'locks.request.start'` \* `n... | https://github.com/nodejs/node/blob/main/doc/api/diagnostics_channel.md | main | nodejs | [
-0.12594857811927795,
-0.02102378010749817,
-0.08680465072393417,
0.010456327348947525,
0.004231642000377178,
-0.08525260537862778,
0.05116580054163933,
-0.026499755680561066,
0.04287106916308403,
0.016853559762239456,
-0.013422158546745777,
0.010426335036754608,
-0.016545187681913376,
-0.... | 0.124428 |
# TTY > Stability: 2 - Stable The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, it will not be necessary or possible to use this module directly. However, it can be accessed using: ```js const tty = require('node:tty'); ``` When Node.js detects that it is being run with a... | https://github.com/nodejs/node/blob/main/doc/api/tty.md | main | nodejs | [
0.01936916634440422,
-0.03535817563533783,
-0.04614942520856857,
0.028719071298837662,
0.04027513787150383,
-0.03305881470441818,
-0.04877490550279617,
0.04630224034190178,
0.01012741681188345,
-0.01798398233950138,
-0.057235997170209885,
0.06595499813556671,
-0.014969916082918644,
-0.0317... | 0.132572 |
write additional data; otherwise `true`. `writeStream.clearLine()` clears the current line of this `WriteStream` in a direction identified by `dir`. ### `writeStream.clearScreenDown([callback])` \* `callback` {Function} Invoked once the operation completes. \* Returns: {boolean} `false` if the stream wishes for the cal... | https://github.com/nodejs/node/blob/main/doc/api/tty.md | main | nodejs | [
-0.040414683520793915,
-0.028308184817433357,
-0.044410038739442825,
0.0015389667823910713,
-0.03235486149787903,
-0.0779021680355072,
0.03525545448064804,
0.0068862223997712135,
0.03715968504548073,
-0.009873434901237488,
0.0012492878595367074,
0.10152069479227066,
-0.021404802799224854,
... | 0.04958 |
`WriteStream`'s cursor \_relative\_ to its current position. ### `writeStream.rows` A `number` specifying the number of rows the TTY currently has. This property is updated whenever the `'resize'` event is emitted. ## `tty.isatty(fd)` \* `fd` {number} A numeric file descriptor \* Returns: {boolean} The `tty.isatty()` m... | https://github.com/nodejs/node/blob/main/doc/api/tty.md | main | nodejs | [
-0.01655915193259716,
0.0029392053838819265,
-0.050622738897800446,
-0.008924541994929314,
-0.010224523022770882,
-0.06226025149226189,
0.04502669349312782,
0.06093793734908104,
0.021493898704648018,
0.05976729840040207,
0.010438108816742897,
0.05086204782128334,
-0.011691788211464882,
-0.... | 0.128509 |
# QUIC > Stability: 1.0 - Early development The 'node:quic' module provides an implementation of the QUIC protocol. To access it, start Node.js with the `--experimental-quic` option and: ```mjs import quic from 'node:quic'; ``` ```cjs const quic = require('node:quic'); ``` The module is only available under the `node:`... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.12250296771526337,
-0.005479130893945694,
-0.03193168342113495,
-0.06711620092391968,
0.03223147988319397,
-0.11321274191141129,
0.035106733441352844,
0.037332747131586075,
0.035084862262010574,
0.058991674333810806,
-0.01991289295256138,
-0.015668904408812523,
-0.0005757382023148239,
-... | 0.133078 |
#### Certificate size and handshake performance QUIC includes an anti-amplification limit ([RFC 9000 Section 8.1][]) that restricts the server to sending at most three times the data received from the client before the client's address is validated. Because the client's Initial packet is typically around 1200 bytes, th... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.055045511573553085,
0.07719777524471283,
0.013760560192167759,
-0.04878239706158638,
-0.05767800286412239,
-0.1362989991903305,
0.05212303251028061,
0.06408397853374481,
0.1082070916891098,
0.0353495329618454,
-0.007085191551595926,
0.01213775109499693,
0.038423433899879456,
0.006711126... | 0.035434 |
For benchmarking scenarios where traffic comes from a single source, increase these values. In addition to rate limiting, the endpoint supports \*\*concurrent connection limits\*\* via `maxConnectionsPerHost` and `maxConnectionsTotal`, and a \*\*busy mode\*\* via [`endpoint.busy`][] that rejects all new connections. Ra... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.07209611684083939,
0.02481435425579548,
-0.039647821336984634,
0.012116021476686,
0.054263513535261154,
-0.08336102962493896,
0.04027237370610237,
0.019231172278523445,
0.05259860306978226,
0.05891392379999161,
-0.0039313300512731075,
-0.012330755591392517,
-0.0053159440867602825,
-0.01... | 0.119527 |
also available for configuring the behavior of the local endpoint and sessions. These include settings for connection limits, congestion control, stream prioritization, and more. ### Callbacks and Promises The `quic` module uses a combination of callbacks and promises for asynchronous operations. For example, initiatin... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.141013041138649,
0.04013707861304283,
-0.04283599182963371,
-0.040999263525009155,
-0.006970146205276251,
-0.06776373833417892,
0.07912272214889526,
0.04821276292204857,
0.12333888560533524,
0.046463411301374435,
-0.028307011350989342,
0.023552002385258675,
-0.03557679057121277,
-0.0076... | 0.168591 |
an error. There is no guarantee of delivery. Datagrams may be lost, duplicated, or delivered out of order. The [`session.ondatagramstatus`][] callback reports whether each sent datagram was `'acknowledged'`, `'lost'`, or `'abandoned'` (never sent on the wire). ### 0-RTT early data and session resumption QUIC supports 0... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.0999620258808136,
0.023021403700113297,
0.02283097803592682,
-0.00030707960831932724,
-0.03587067499756813,
-0.08736618608236313,
0.10912696272134781,
0.006278499495238066,
0.061907269060611725,
0.09306041151285172,
0.027576453983783722,
0.009468047879636288,
0.021131280809640884,
-0.01... | 0.011842 |
used in the `RESET\_STREAM` or `STOP\_SENDING` frame sent to the peer. Any other error type falls back to the negotiated protocol's generic internal error code. ### Permission model When using the [Permission Model][], the `--allow-net` flag must be passed to allow QUIC network operations. Without it, calling [`quic.co... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.027127115055918694,
0.01246501412242651,
-0.07441587001085281,
-0.054487284272909164,
0.07417025417089462,
-0.07795539498329163,
0.05451243370771408,
0.03986690565943718,
0.0043191383592784405,
0.08333494514226913,
0.01768481731414795,
0.026326430961489677,
-0.022529156878590584,
0.0460... | 0.081813 |
when [`sessionOptions.groups`][] is not specified. ## Class: `QuicEndpoint` A `QuicEndpoint` encapsulates the local UDP-port binding for QUIC. It can be used as both a client and a server. ### `new QuicEndpoint([options])` \* `options` {quic.EndpointOptions} ### `endpoint.address` \* Type: {net.SocketAddress|undefined}... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.07897325605154037,
0.05319531634449959,
-0.04316416010260582,
-0.06700018793344498,
-0.02260955423116684,
-0.07866423577070236,
0.07562816143035889,
0.08763619512319565,
0.01897686906158924,
0.07223775237798691,
0.036835845559835434,
0.022165756672620773,
-0.05487110838294029,
0.0393033... | 0.095111 |
destroyed. Read only. ### `endpointStats.bytesReceived` \* Type: {bigint} The total number of bytes received by this endpoint. Read only. ### `endpointStats.bytesSent` \* Type: {bigint} The total number of bytes sent by this endpoint. Read only. ### `endpointStats.packetsReceived` \* Type: {bigint} The total number of ... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.03511090576648712,
0.054905787110328674,
0.0031480721663683653,
-0.041309475898742676,
0.03063930757343769,
-0.09822674095630646,
0.1516280174255371,
0.05691136047244072,
0.04879686236381531,
0.15316946804523468,
-0.03376525267958641,
0.03286316245794296,
0.011246530339121819,
0.0152249... | 0.076096 |
a non-zero `code` is specified, the promise will reject with an `ERR\_QUIC\_TRANSPORT\_ERROR` or `ERR\_QUIC\_APPLICATION\_ERROR` depending on the `type`. ### `session.opened` \* Type: {Promise} for an {Object} \* `local` {net.SocketAddress} The local socket address. \* `remote` {net.SocketAddress} The remote socket add... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.12133654206991196,
0.08330269157886505,
-0.0034099689219146967,
0.026633553206920624,
-0.04849100485444069,
-0.0772923082113266,
-0.01253543235361576,
-0.018286585807800293,
0.114376001060009,
0.00965626910328865,
-0.005670775193721056,
-0.017856143414974213,
0.012708556838333607,
0.019... | 0.033264 |
the 0-RTT phase have been destroyed. The application should re-open streams if needed. Read/write. This callback only fires on the client side when the server rejects the client's 0-RTT attempt. The connection falls back to 1-RTT and continues normally. ### `session.onpathvalidation` \* Type: {quic.OnPathValidationCall... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.0862761065363884,
0.05819679796695709,
-0.02883247844874859,
-0.02801860123872757,
-0.01602991484105587,
-0.10470479726791382,
0.04342207685112953,
0.06567706912755966,
0.0821785256266594,
0.09098569303750992,
-0.015601717866957188,
-0.015454539097845554,
-0.026342440396547318,
0.083988... | -0.040989 |
`priority` {string} The priority level of the stream. One of `'high'`, `'default'`, or `'low'`. \*\*Default:\*\* `'default'`. \* `incremental` {boolean} When `true`, data from this stream may be interleaved with data from other streams of the same priority level. When `false`, the stream should be completed before same... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.0812235176563263,
0.0005641630268655717,
-0.004442490637302399,
0.0257496889680624,
0.002714431844651699,
-0.1310485601425171,
-0.0018691506702452898,
0.03406130522489548,
0.02943556010723114,
-0.013960199430584908,
-0.04950137063860893,
0.06018184870481491,
-0.04415027052164078,
-0.039... | 0.018032 |
into an internal buffer; the caller's source buffer is unchanged and may be reused or mutated immediately after the call returns. Callers that want to ensure their source cannot be mutated after the call (for example, when handing the buffer off to another async consumer) can call `ArrayBuffer.prototype.transfer()` the... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.04552808403968811,
-0.02179909124970436,
-0.009797721169888973,
-0.006884852424263954,
-0.06711848080158234,
-0.10365772247314453,
0.035792168229818344,
-0.06447436660528183,
0.07201055437326431,
-0.01963425986468792,
-0.021149517968297005,
-0.014719129540026188,
-0.026584042236208916,
... | 0.080882 |
`sessionStats.bytesSent` \* Type: {bigint} ### `sessionStats.bidiInStreamCount` \* Type: {bigint} ### `sessionStats.bidiOutStreamCount` \* Type: {bigint} ### `sessionStats.uniInStreamCount` \* Type: {bigint} ### `sessionStats.uniOutStreamCount` \* Type: {bigint} ### `sessionStats.maxBytesInFlight` \* Type: {bigint} ###... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.017252683639526367,
0.07413676381111145,
-0.03406001999974251,
-0.03201967850327492,
-0.043883439153432846,
-0.06962645053863525,
0.05922912433743477,
0.024997098371386528,
0.03514863923192024,
0.09801588207483292,
-0.048397354781627655,
-0.003084327559918165,
-0.041348159313201904,
0.0... | 0.0905 |
`error` {any} \* `options` {Object} \* `code` {bigint|number} The application error code to include in the `RESET\_STREAM` and `STOP\_SENDING` frames sent to the peer. Numbers are coerced to `BigInt`. When omitted, the wire code is derived from `error` (see below). \* `reason` {string} An optional human-readable reason... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.08010513335466385,
0.05872644484043121,
0.01684393920004368,
0.02041705511510372,
0.08461491018533707,
-0.05924711748957634,
0.08698639273643494,
0.06181759014725685,
0.033429425209760666,
0.0180126391351223,
-0.054532669484615326,
0.07644262164831161,
-0.0729839876294136,
0.05549333617... | 0.111628 |
need to be adjusted based on application needs. The valid range is `0` to `4294967295`. ### `stream.id` \* Type: {bigint|null} The stream ID, or `null` if the stream has been destroyed or is still pending. Read only. ### `stream.onerror` \* Type: {Function|undefined} An optional callback invoked when the stream is dest... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.10164715349674225,
0.04979895427823067,
0.00769076868891716,
0.03999345004558563,
0.07784578949213028,
-0.08879820257425308,
0.016562309116125107,
0.08787970244884491,
0.04257757216691971,
-0.012333925813436508,
-0.04312531650066376,
0.021609632298350334,
-0.022810600697994232,
0.025106... | 0.060708 |
if set on a session that does not support headers. Read/write. ### `stream.sendHeaders(headers[, options])` \* `headers` {Object} Header object with string keys and string or string-array values. Pseudo-headers (`:method`, `:path`, etc.) must appear before regular headers. \* `options` {Object} \* `terminal` {boolean} ... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.034335456788539886,
0.06948602944612503,
-0.04029441624879837,
0.007214248646050692,
0.006921844556927681,
-0.04437058046460152,
0.02745180018246174,
0.05597382411360741,
-0.00043466902570798993,
0.07405494898557663,
-0.05194205045700073,
-0.07052428275346756,
0.013957115821540356,
0.07... | 0.046873 |
write. \* `endSync()` — Synchronous close. Returns total bytes or `-1`. \* `end([options])` — Async close. \* `fail(reason)` — Errors the stream (sends `RESET\_STREAM` to peer). When `reason` is a [`QuicError`][], its [`error.errorCode`][] is used as the wire code on the resulting `RESET\_STREAM` frame; otherwise the w... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.08841553330421448,
-0.007311880122870207,
-0.053294070065021515,
0.005644225049763918,
0.05271688103675842,
-0.09975570440292358,
0.013079742901027203,
0.060459982603788376,
0.015407798811793327,
0.04251491278409958,
-0.0023629534989595413,
0.0015765909338369966,
-0.0269971564412117,
-0... | 0.097259 |
monotonically. It is useful for diagnosing whether a stream experienced backpressure episodes and whether the accumulation buffer sizing is appropriate for the workload. ### `streamStats.maxOffset` \* Type: {bigint} ### `streamStats.maxOffsetAcknowledged` \* Type: {bigint} ### `streamStats.maxOffsetReceived` \* Type: {... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.04201241582632065,
0.055731259286403656,
-0.051198650151491165,
-0.02628830075263977,
-0.015522859059274197,
-0.0416790209710598,
0.029295001178979874,
0.11346697062253952,
-0.028301026672124863,
-0.006606830283999443,
-0.10176679491996765,
0.0038838544860482216,
-0.011665845289826393,
... | 0.145739 |
`0` (default) means the endpoint is only destroyed when explicitly closed via `endpoint.close()` or `endpoint.destroy()`. A positive value starts an idle timer when the endpoint becomes idle; if no new sessions are created before the timer fires, the endpoint is automatically destroyed. This is useful for connection po... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.09845887869596481,
0.002543423557654023,
-0.04930007457733154,
-0.052490536123514175,
-0.007813992910087109,
-0.06761182844638824,
0.010844094678759575,
0.01956515945494175,
0.0780283659696579,
0.03211759030818939,
0.012917120940983295,
0.07296893745660782,
-0.07642902433872223,
-0.0224... | 0.131892 |
limiting takes effect. #### `endpointOptions.retryTokenExpiration` \* Type: {bigint|number} Specifies the length of time a QUIC retry token is considered valid. #### `endpointOptions.resetTokenSecret` \* Type: {ArrayBufferView} Specifies the 16-byte secret used to generate QUIC retry tokens. #### `endpointOptions.token... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.050598397850990295,
-0.007734099868685007,
-0.018199048936367035,
-0.09074084460735321,
-0.018561951816082,
-0.0751861035823822,
0.05702368542551994,
0.08787214756011963,
-0.010711164213716984,
0.06997764855623245,
0.008920378983020782,
-0.03979264572262764,
-0.017970288172364235,
-0.00... | 0.100679 |
window size. #### `sessionOptions.minVersion` \* Type: {number} The minimum QUIC version number to allow. This is an advanced option that users typically won't have need to specify. #### `sessionOptions.preferredAddressPolicy` \* Type: {string} One of `'use'`, `'ignore'`, or `'default'`. \* \*\*Default:\*\* `'ignore'` ... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
0.0009175432496704161,
0.08337433636188507,
-0.008904983289539814,
-0.03404608741402626,
-0.05844159424304962,
-0.024264823645353317,
0.10949841141700745,
0.018796823918819427,
0.05946086719632149,
0.07216491550207138,
0.010036910884082317,
0.049570973962545395,
0.015384229831397533,
0.110... | 0.035988 |
deployments, setting a value closer to the actual RTT (e.g., `1`) avoids unnecessarily conservative initial behavior. #### `sessionOptions.keepAlive` \* Type: {bigint|number} \* \*\*Default:\*\* `0` (disabled) Specifies the keep-alive timeout in milliseconds. When set to a non-zero value, PING frames will be sent autom... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.06002788245677948,
0.09443598985671997,
-0.04415889456868172,
0.04025430232286453,
0.01017655711621046,
-0.08026158064603806,
0.05787826329469681,
0.025144649669528008,
0.021000422537326813,
0.008442907594144344,
0.0170165803283453,
0.008443158119916916,
0.01511105801910162,
0.059267230... | 0.042008 |
from the server via the [`session.onnewtoken`][] callback. Providing a valid token on reconnection allows the client to skip the server's address validation, reducing handshake latency. #### `sessionOptions.transportParams` \* Type: {quic.TransportParams} The QUIC transport parameters to use for the session. #### `sess... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.12203424423933029,
0.059874411672353745,
-0.004861431661993265,
-0.012695018202066422,
-0.00665458245202899,
-0.08144503086805344,
0.09082724899053574,
0.038589607924222946,
0.023754460737109184,
0.08170456439256668,
0.0043190824799239635,
-0.016133369877934456,
0.04494469612836838,
0.0... | 0.022245 |
`session.localTransportParams` and `session.remoteTransportParams` properties. ## Callbacks ### Callback error handling All session and stream callbacks may be synchronous functions or async functions. If a callback throws synchronously or returns a promise that rejects, the error is caught and the owning session or st... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.08785785734653473,
0.0015067553613334894,
0.0075976112857460976,
-0.0017514775972813368,
0.031053608283400536,
-0.04299962893128395,
0.04518746957182884,
0.031718939542770386,
0.04609912261366844,
0.012420049868524075,
0.014292026869952679,
0.02876126393675804,
-0.023330911993980408,
0.... | 0.000963 |
error code. `0` if validation succeeded. \* `earlyDataAttempted` {boolean} Whether 0-RTT early data was attempted. \* `earlyDataAccepted` {boolean} Whether 0-RTT early data was accepted. ### Callback: `OnNewTokenCallback` \* `this` {quic.QuicSession} \* `token` {Buffer} The NEW\\_TOKEN token data. \* `address` {SocketA... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.036582689732313156,
0.027857648208737373,
-0.0036280101630836725,
-0.06213910132646561,
-0.01240883581340313,
-0.11477330327033997,
0.10472938418388367,
0.01830167882144451,
0.057561811059713364,
0.122059665620327,
0.04405878856778145,
-0.0592348612844944,
-0.010930991731584072,
0.05324... | 0.064082 |
```mjs import { connect } from 'node:quic'; import process from 'node:process'; const session = await connect('example.com:443', { // ALPN defaults to 'h3'. servername: 'example.com', }); await session.opened; const stream = await session.createBidirectionalStream({ headers: { ':method': 'GET', ':path': '/', ':scheme':... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.0235616322606802,
0.10513094812631607,
-0.06662014126777649,
-0.02539825439453125,
-0.026623830199241638,
-0.07923398911952972,
-0.028015756979584694,
0.05092595890164375,
0.03560524806380272,
0.04441576451063156,
-0.043678998947143555,
-0.03538511320948601,
-0.02627955563366413,
0.0108... | 0.048511 |
when the object was created. \* `duration` {number} Lifetime in milliseconds from creation to destruction. \* `detail` {Object} Entry-specific metadata (see below). ### `QuicEndpoint` entries \* `detail.stats` {QuicEndpointStats} The endpoint's statistics object (frozen at destruction time). ### `QuicSession` entries \... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.06888014823198318,
0.08903785049915314,
-0.043181221932172775,
0.016840025782585144,
-0.008517068810760975,
-0.0958423987030983,
0.02717413567006588,
0.03511079400777817,
0.06725811958312988,
0.0916483923792839,
-0.014150967821478844,
-0.021588310599327087,
0.010721629485487938,
-0.0086... | 0.164588 |
\* `stats` {quic.QuicSession.Stats} Final session statistics. Published when a session is destroyed. The `stats` object is a snapshot of the final statistics at the time of destruction. ### Channel: `quic.session.error` \* `session` {quic.QuicSession} \* `error` {any} The error that caused the session to be destroyed. ... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.04501383379101753,
0.05181235447525978,
-0.019611485302448273,
-0.028729010373353958,
0.018266946077346802,
-0.12321203947067261,
0.11944399774074554,
0.09380321949720383,
0.06708675622940063,
0.12255513668060303,
-0.05101189389824867,
-0.02476431429386139,
0.007613698951900005,
0.01289... | 0.126733 |
For client-side streams, this contains response headers (`:status`, etc.). ### Channel: `quic.stream.trailers` \* `stream` {quic.QuicStream} \* `session` {quic.QuicSession} \* `trailers` {Object} The trailing headers. Published when trailing headers are received on a stream. ### Channel: `quic.stream.info` \* `stream` ... | https://github.com/nodejs/node/blob/main/doc/api/quic.md | main | nodejs | [
-0.056039080023765564,
0.061379194259643555,
0.0026975858490914106,
-0.03640568256378174,
0.08025190234184265,
-0.04741846024990082,
0.07964234799146652,
0.06018294021487236,
0.028349844738841057,
0.07380908727645874,
-0.04644579812884331,
-0.05224165320396423,
-0.007359186187386513,
0.020... | 0.071954 |
# C++ embedder API Node.js provides a number of C++ APIs that can be used to execute JavaScript in a Node.js environment from other C++ software. The documentation for these APIs can be found in [src/node.h][] in the Node.js source tree. In addition to the APIs exposed by Node.js, some required concepts are provided by... | https://github.com/nodejs/node/blob/main/doc/api/embedding.md | main | nodejs | [
-0.07510527223348618,
-0.033505767583847046,
0.09608617424964905,
0.02464737556874752,
0.11644420027732849,
-0.01335647888481617,
-0.14083488285541534,
0.06871029734611511,
0.015714965760707855,
-0.03817690908908844,
-0.04204577952623367,
0.047254353761672974,
0.012132825329899788,
-0.0825... | 0.081451 |
RunNodeInstance(MultiIsolatePlatform* platform, const std::vector& args, const std::vector& exec_args) { int exit_code = 0; // Setup up a libuv event loop, v8::Isolate, and Node.js Environment. std::vector errors; std::unique_ptr setup = CommonEnvironmentSetup::Create(platform, &errors, args, exec_args); if (!setup) { ... | https://github.com/nodejs/node/blob/main/doc/api/embedding.md | main | nodejs | [
-0.016795538365840912,
0.032813481986522675,
-0.06207776442170143,
-0.02085106633603573,
0.06370922923088074,
-0.04375762492418289,
-0.05402105301618576,
0.06271965056657791,
-0.045160528272390366,
-0.07167959958314896,
0.009374924935400486,
-0.07161810249090195,
-0.019243184477090836,
-0.... | 0.035335 |
# HTTPS > Stability: 2 - Stable HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module. ## Determining if crypto support is unavailable It is possible for Node.js to be built without including support for the `node:crypto` module. In such cases, attempting to `import` from `https` ... | https://github.com/nodejs/node/blob/main/doc/api/https.md | main | nodejs | [
-0.06304945796728134,
-0.01270033698529005,
0.0059420643374323845,
0.04362523555755615,
0.09922359138727188,
-0.057515084743499756,
-0.06254534423351288,
0.003107793629169464,
0.011350040324032307,
-0.014357635751366615,
-0.020439041778445244,
0.04316488653421402,
0.025290625169873238,
0.0... | 0.07366 |
[`server.maxHeadersCount`][] in the `node:http` module. ### `server.requestTimeout` \* Type: {number} \*\*Default:\*\* `300000` See [`server.requestTimeout`][] in the `node:http` module. ### `server.setTimeout([msecs][, callback])` \* `msecs` {number} \*\*Default:\*\* `120000` (2 minutes) \* `callback` {Function} \* Re... | https://github.com/nodejs/node/blob/main/doc/api/https.md | main | nodejs | [
-0.03853214904665947,
0.06899458914995193,
-0.03815263882279396,
0.058922622352838516,
-0.0043250988237559795,
-0.07532894611358643,
-0.08792275190353394,
-0.011803362518548965,
0.10849866271018982,
0.003958337474614382,
-0.017897194251418114,
0.011428585276007652,
-0.010182015597820282,
-... | 0.067354 |
with [`new URL()`][]. If it is a [`URL`][] object, it will be automatically converted to an ordinary `options` object. `https.request()` returns an instance of the [`http.ClientRequest`][] class. The `ClientRequest` instance is a writable stream. If one needs to upload a file with a POST request, then write to the `Cli... | https://github.com/nodejs/node/blob/main/doc/api/https.md | main | nodejs | [
-0.055004000663757324,
0.07575953751802444,
0.0005284218350425363,
-0.007227678783237934,
-0.004727022722363472,
-0.11024056375026703,
-0.04277771711349487,
0.03800186142325401,
0.02723696455359459,
0.01303104404360056,
-0.07248803228139877,
0.05020234361290932,
-0.0049624075181782246,
-0.... | -0.035492 |
{ return crypto.createHash('sha256').update(s).digest('base64'); } const options = { hostname: 'github.com', port: 443, path: '/', method: 'GET', checkServerIdentity: function(host, cert) { // Make sure the certificate is issued to the host we are connected to const err = tls.checkServerIdentity(host, cert); if (err) {... | https://github.com/nodejs/node/blob/main/doc/api/https.md | main | nodejs | [
0.0028057023882865906,
0.06581457704305649,
-0.06487499922513962,
-0.04171067848801613,
0.0381137989461422,
-0.0485343262553215,
-0.06811819970607758,
-0.027205226942896843,
0.06658271700143814,
-0.0016976820770651102,
0.000812129583209753,
-0.011280081234872341,
0.024835294112563133,
-0.0... | -0.06368 |
# Domain > Stability: 0 - Deprecated \*\*This module is pending deprecation.\*\* Once a replacement API has been finalized, this module will be fully deprecated. Most developers should \*\*not\*\* have cause to use this module. Users who absolutely must have the functionality that domains provide may rely on it for the... | https://github.com/nodejs/node/blob/main/doc/api/domain.md | main | nodejs | [
-0.08889972418546677,
-0.0369335412979126,
0.05813979730010033,
0.049105025827884674,
0.07885585725307465,
-0.14039765298366547,
0.0075292522087693214,
-0.0016913411673158407,
0.10380326211452484,
-0.06864293664693832,
-0.055325694382190704,
0.04966561123728752,
0.004492681939154863,
-0.01... | 0.128622 |
domain = require('node:domain'); // See the cluster documentation for more details about using // worker processes to serve requests. How it works, caveats, etc. const server = require('node:http').createServer((req, res) => { const d = domain.create(); d.on('error', (er) => { console.error(`error ${er.stack}`); // We'... | https://github.com/nodejs/node/blob/main/doc/api/domain.md | main | nodejs | [
-0.055287186056375504,
-0.014301184564828873,
-0.012959843501448631,
0.0375419557094574,
0.021011993288993835,
-0.08765923976898193,
-0.08716379851102829,
0.015375681221485138,
0.03347020223736763,
0.02706310898065567,
-0.07581637054681778,
0.01896572858095169,
-0.03161480277776718,
-0.036... | 0.124142 |
to some other domain. For example, there could be one domain in use for an HTTP server, but perhaps we would like to have a separate domain to use for each request. That is possible via explicit binding. ```js // Create a top-level domain for the server const domain = require('node:domain'); const http = require('node:... | https://github.com/nodejs/node/blob/main/doc/api/domain.md | main | nodejs | [
-0.10885162651538849,
-0.032287053763866425,
-0.030565114691853523,
-0.025641456246376038,
-0.04736052080988884,
-0.09787584841251373,
-0.06428314000368118,
0.03473038226366043,
0.07526900619268417,
0.022737273946404457,
-0.09724676609039307,
-0.011758663691580296,
0.02010137028992176,
0.0... | -0.006754 |
a domain. If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. Calling `exit()` changes only the active domain, and does not alter the domain itself. `enter()` and `exit()` can be called an arbitrary number of times on a single domain. #... | https://github.com/nodejs/node/blob/main/doc/api/domain.md | main | nodejs | [
-0.06590251624584198,
0.011794278398156166,
-0.03759453073143959,
0.006501965224742889,
0.03106572851538658,
-0.13001324236392975,
-0.02843768335878849,
0.05966075137257576,
0.09302151203155518,
-0.012379049323499203,
-0.04196581989526749,
0.06949431449174881,
0.013186310417950153,
-0.0558... | 0.10338 |
# DNS > Stability: 2 - Stable The `node:dns` module enables name resolution. For example, use it to look up IP addresses of host names. Although named for the [Domain Name System (DNS)][], it does not always use the DNS protocol for lookups. [`dns.lookup()`][] uses the operating system facilities to perform name resolu... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.09178681671619415,
0.039951641112565994,
-0.017105553299188614,
-0.03432729095220566,
-0.058179836720228195,
-0.12533076107501984,
-0.09614711999893188,
0.022721391171216965,
0.06766930967569351,
-0.017879022285342216,
-0.05619112774729729,
0.025395317003130913,
-0.017651211470365524,
-... | 0.072842 |
to the default and the operating system will choose a local address automatically. The resolver will use the v4 local address when making requests to IPv4 DNS servers, and the v6 local address when making requests to IPv6 DNS servers. The `rrtype` of resolution requests has no impact on the local address used. ## `dns.... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.05331297218799591,
0.0367848165333271,
-0.012588836252689362,
-0.01613304577767849,
-0.07968375086784363,
-0.033783942461013794,
-0.11449890583753586,
0.0025880015455186367,
0.029632199555635452,
-0.016484687104821205,
-0.05286809802055359,
0.08061028271913528,
-0.062236666679382324,
0.... | -0.036161 |
set to `'ENOTFOUND'` not only when the host name does not exist but also when the lookup fails in other ways such as no available file descriptors. `dns.lookup()` does not necessarily have anything to do with the DNS protocol. The implementation uses an operating system facility that can associate names with addresses ... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.09885776042938232,
0.0389719121158123,
0.04312775284051895,
-0.0194498710334301,
-0.008510759100317955,
-0.0959601029753685,
-0.08980083465576172,
-0.022064046934247017,
0.049694597721099854,
-0.005339340306818485,
-0.056515518575906754,
0.03833619877696037,
-0.03765975311398506,
-0.060... | 0.052573 |
structure of individual results varies based on `rrtype`: | `rrtype` | `records` contains | Result type | Shorthand method | | --------- | ------------------------------ | ----------- | ------------------------ | | `'A'` | IPv4 addresses (default) | {string} | [`dns.resolve4()`][] | | `'AAAA'` | IPv6 addresses | {strin... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.03092562034726143,
0.07611051201820374,
-0.011328511871397495,
-0.0208116564899683,
-0.08975428342819214,
-0.09238717705011368,
-0.017720887437462807,
-0.012311046943068504,
0.015469920821487904,
0.016906755045056343,
-0.018437623977661133,
-0.03221290558576584,
0.01846850849688053,
-0.... | -0.001345 |
example of the `ret` object passed to the callback: ```js [ { type: 'A', address: '127.0.0.1', ttl: 299 }, { type: 'CNAME', value: 'example.com' }, { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, { type: 'NS', value: 'ns1.example.com' }, { type: 'TXT', entries: [ 'v=spf1 include:\_spf.example.com ~a... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.0359589047729969,
-0.05426590144634247,
-0.034027427434921265,
0.007879670709371567,
-0.05523723363876343,
-0.12172972410917282,
0.01816585473716259,
-0.023164300248026848,
0.051153045147657394,
0.020333917811512947,
0.01311818603426218,
0.014853818342089653,
-0.09860865026712418,
0.010... | 0.013475 |
array of objects with the following properties: \* `priority` \* `weight` \* `port` \* `name` ```js ({ priority: 10, weight: 5, port: 21223, name: 'service.example.com', }); ``` ## `dns.resolveTlsa(hostname, callback)` \* `hostname` {string} \* `callback` {Function} \* `err` {Error} \* `records` {Object\[]} Uses the DN... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.11050313711166382,
0.07809580862522125,
-0.02073861099779606,
0.014373497106134892,
-0.12005539983510971,
-0.11517465859651566,
0.009619755670428276,
-0.0017164073651656508,
0.05616496130824089,
-0.05196582153439522,
-0.058345187455415726,
-0.02460341528058052,
0.009431357495486736,
0.0... | 0.006423 |
= new Resolver(); resolver.setServers(['4.4.4.4']); // This request will use the server at 4.4.4.4, independent of global settings. const addresses = await resolver.resolve4('example.org'); ``` ```cjs const { Resolver } = require('node:dns').promises; const resolver = new Resolver(); resolver.setServers(['4.4.4.4']); /... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.07330039888620377,
0.03272749483585358,
0.012960021384060383,
0.015184683725237846,
-0.0916849672794342,
-0.05177527293562889,
-0.1360660344362259,
0.034297842532396317,
0.036367017775774,
-0.0254992563277483,
-0.07875211536884308,
-0.017194340005517006,
-0.04364035651087761,
0.01055411... | -0.017542 |
also when the lookup fails in other ways such as no available file descriptors. [`dnsPromises.lookup()`][] does not necessarily have anything to do with the DNS protocol. The implementation uses an operating system facility that can associate names with addresses and vice versa. This implementation can have subtle but ... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.14992474019527435,
0.06652090698480606,
0.03251659870147705,
0.00393707538023591,
-0.0026102408301085234,
-0.04214583709836006,
-0.08888254314661026,
0.01514887623488903,
0.06986760348081589,
-0.02692565880715847,
-0.07434797286987305,
0.03001571260392666,
-0.018756838515400887,
-0.0158... | 0.041431 |
options])` \* `hostname` {string} Host name to resolve. \* `options` {Object} \* `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record. When `true`, the `Promise` is resolved with an array of `{ address: '1.2.3.4', ttl: 60 }` objects rather than an array of strings, with the TTL expressed in seconds. Use... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.07987719029188156,
0.062404874712228775,
0.008169196546077728,
0.02284415066242218,
-0.07759138941764832,
-0.08900868147611618,
-0.03671969100832939,
-0.0016865732613950968,
0.07819630950689316,
0.0025811060331761837,
-0.059621404856443405,
-0.004503585398197174,
-0.04466789960861206,
-... | 0.026007 |
\* `regexp` \* `replacement` \* `order` \* `preference` ```js ({ flags: 's', service: 'SIP+D2U', regexp: '', replacement: '\_sip.\_udp.example.com', order: 30, preference: 100, }); ``` ### `dnsPromises.resolveNs(hostname)` \* `hostname` {string} Uses the DNS protocol to resolve name server records (`NS` records) for th... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.1609942466020584,
0.01201192568987608,
0.06782009452581406,
-0.045479968190193176,
-0.06854885816574097,
-0.1077561005949974,
-0.0026139183901250362,
-0.0005228829104453325,
0.06230393424630165,
0.011981416493654251,
-0.0344952717423439,
0.010783600620925426,
-0.007409858051687479,
0.04... | 0.059325 |
with the first server provided results in a `NOTFOUND` error, the `resolve()` method will \_not\_ attempt to resolve with subsequent servers provided. Fallback DNS servers will only be used if the earlier ones time out or result in some other error. ## Error codes Each DNS query can return one of the following error co... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.09899994730949402,
-0.010991687886416912,
0.03179385885596275,
0.015283062122762203,
-0.09370607137680054,
-0.06818228960037231,
-0.07992630451917648,
0.005422148387879133,
0.06918949633836746,
0.022936802357435226,
0.035368241369724274,
-0.006059563718736172,
-0.01795528642833233,
0.00... | 0.011846 |
#dnsresolve6hostname-options-callback [`dns.resolveAny()`]: #dnsresolveanyhostname-callback [`dns.resolveCaa()`]: #dnsresolvecaahostname-callback [`dns.resolveCname()`]: #dnsresolvecnamehostname-callback [`dns.resolveMx()`]: #dnsresolvemxhostname-callback [`dns.resolveNaptr()`]: #dnsresolvenaptrhostname-callback [`dns.... | https://github.com/nodejs/node/blob/main/doc/api/dns.md | main | nodejs | [
-0.0526459701359272,
-0.03504888340830803,
-0.01435947883874178,
-0.05221248045563698,
-0.10758870840072632,
-0.10852496325969696,
-0.114628367125988,
-0.04839938133955002,
-0.014659836888313293,
0.034036774188280106,
-0.027208061888813972,
-0.01120641827583313,
-0.06277866661548615,
-0.03... | -0.023858 |
# Index \* [About this documentation](documentation.md) \* [Usage and example](synopsis.md) --- \* [Assertion testing](assert.md) \* [Asynchronous context tracking](async\_context.md) \* [Async hooks](async\_hooks.md) \* [Buffer](buffer.md) \* [C++ addons](addons.md) \* [C/C++ addons with Node-API](n-api.md) \* [C++ em... | https://github.com/nodejs/node/blob/main/doc/api/index.md | main | nodejs | [
-0.042584314942359924,
0.01397649385035038,
-0.08260118961334229,
0.024524016305804253,
0.12373528629541397,
-0.06028790399432182,
-0.01533224992454052,
0.003054724307730794,
-0.0002605204936116934,
0.015347310341894627,
-0.024404751136898994,
-0.032985903322696686,
0.039017435163259506,
-... | 0.149066 |
# Internationalization support Node.js has many features that make it easier to write internationalized programs. Some of them are: \* Locale-sensitive or Unicode-aware functions in the [ECMAScript Language Specification][ECMA-262]: \* [`String.prototype.normalize()`][] \* [`String.prototype.toLowerCase()`][] \* [`Stri... | https://github.com/nodejs/node/blob/main/doc/api/intl.md | main | nodejs | [
-0.031485479325056076,
0.0629584938287735,
0.048401620239019394,
-0.053527869284152985,
-0.015259780921041965,
-0.03734574839472771,
-0.043487876653671265,
0.02748791128396988,
-0.022838376462459564,
-0.000012110474017390516,
-0.08654391020536423,
-0.055664148181676865,
-0.02163679152727127,... | 0.119314 |
require ICU locale data in addition, such as [`Intl.DateTimeFormat`][] \_may\_ be fully or partially supported, depending on the completeness of the ICU data installed on the system. ### Embed a limited set of ICU data (`small-icu`) This option makes the resulting binary link against the ICU library statically, and inc... | https://github.com/nodejs/node/blob/main/doc/api/intl.md | main | nodejs | [
-0.017695924267172813,
0.04489996284246445,
0.022401776164770126,
-0.035903509706258774,
-0.0023524921853095293,
-0.00042127547203563154,
-0.08895517140626907,
0.08090120553970337,
-0.02109367400407791,
-0.04446835443377495,
-0.012780158780515194,
-0.03743579983711243,
-0.059003252536058426,... | 0.159371 |
const hasICU = typeof Intl === 'object'; ``` Alternatively, checking for `process.versions.icu`, a property defined only when ICU is enabled, works too: ```js const hasICU = typeof process.versions.icu === 'string'; ``` To check for support for a non-English locale (i.e. `full-icu` or `system-icu`), [`Intl.DateTimeForm... | https://github.com/nodejs/node/blob/main/doc/api/intl.md | main | nodejs | [
0.0018702842062339187,
0.03255748376250267,
0.04121194779872894,
-0.015445002354681492,
0.008525840938091278,
0.018792767077684402,
-0.001061833230778575,
0.0480496883392334,
-0.01388009823858738,
-0.044414959847927094,
-0.05591120198369026,
-0.08169420808553696,
-0.06116339936852455,
0.02... | 0.216826 |
# Readline > Stability: 2 - Stable The `node:readline` module provides an interface for reading data from a [Readable][] stream (such as [`process.stdin`][]) one line at a time. To use the promise-based APIs: ```mjs import \* as readline from 'node:readline/promises'; ``` ```cjs const readline = require('node:readline/... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
-0.10451702028512955,
-0.03343605622649193,
-0.05311103165149689,
0.07068569213151932,
-0.056227266788482666,
-0.024758270010352135,
-0.01881655678153038,
0.09285206347703934,
0.004806389566510916,
-0.04670833423733711,
-0.07913005352020264,
0.08072623610496521,
0.03162518888711929,
-0.040... | 0.127389 |
{ console.log(`Received: ${history}`); }); ``` ### Event: `'pause'` The `'pause'` event is emitted when one of the following occur: \* The `input` stream is paused. \* The `input` stream is not paused and receives the `'SIGCONT'` event. (See events [`'SIGTSTP'`][] and [`'SIGCONT'`][].) The listener function is called w... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
-0.02064644545316696,
-0.026453569531440735,
-0.022535525262355804,
0.002395716728642583,
0.06004054844379425,
0.048531483858823776,
0.05200310796499252,
-0.011840025894343853,
0.13300999999046326,
-0.08688414841890335,
-0.007573368493467569,
0.03002406656742096,
-0.07766949385404587,
0.02... | 0.109871 |
The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. ### `rl.getPrompt()` \* Returns: {string} the current prompt string The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. ### `rl.write(data[, key])` \* `data` {string} \* `key` {Object... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
0.010675773955881596,
-0.002881582360714674,
-0.07978705316781998,
0.037533409893512726,
-0.038863133639097214,
0.012985960580408573,
0.04690112546086311,
0.1044461652636528,
0.005063612014055252,
0.005803459323942661,
-0.004595441743731499,
-0.015902375802397728,
0.08774515241384506,
-0.0... | 0.023031 |
prompt the cursor currently lands on \* `cols` {number} the screen column the cursor currently lands on Returns the real position of the cursor in relation to the input prompt + string. Long input (wrapping) strings, as well as multiple line prompts are included in the calculations. ## Promises API ### Class: `readline... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
-0.09067852050065994,
-0.01543011236935854,
-0.05948058143258095,
0.022462310269474983,
-0.06467960774898529,
-0.010036051273345947,
0.05124053731560707,
0.08704999834299088,
-0.0036478794645518064,
-0.00948759913444519,
-0.06031769886612892,
-0.02048247493803501,
0.09958657622337341,
-0.0... | 0.094027 |
the cursor \_relative\_ to its current position in the associated `stream`. Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. #### `rl.rollback()` \* Returns: this The `rl.rollback` methods clears the internal list of pending actions without sending it to the ... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
-0.07900247722864151,
-0.054334599524736404,
-0.06141136959195137,
0.007435062900185585,
-0.0008722528582438827,
0.01845680922269821,
0.061097629368305206,
0.017321964725852013,
0.023557687178254128,
0.045705653727054596,
-0.009446640498936176,
0.05746668204665184,
0.005312731489539146,
0.... | 0.058596 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.