content large_stringlengths 3 20.5k | url large_stringlengths 54 193 | branch large_stringclasses 4
values | source large_stringclasses 42
values | embeddings listlengths 384 384 | score float64 -0.21 0.65 |
|---|---|---|---|---|---|
'mark', \* startTime: 81.860064, \* duration: 0, \* detail: null \* } \* ] \*/ performance.clearMarks(); performance.clearMeasures(); observer.disconnect(); }); obs.observe({ type: 'mark' }); performance.mark('test'); performance.mark('meow'); ``` ```cjs const { performance, PerformanceObserver, } = require('node:perf\... | https://github.com/nodejs/node/blob/main//doc/api/perf_hooks.md | main | nodejs | [
0.03726703301072121,
0.05084995552897453,
-0.017237521708011627,
0.06921125203371048,
0.012265387922525406,
-0.029078073799610138,
0.028627092018723488,
0.05309818685054779,
0.07213272899389267,
-0.033654097467660904,
-0.0837315022945404,
-0.08701100945472717,
-0.08660094439983368,
-0.0029... | 0.062908 |
a number between `1` and `5`. \*\*Default:\*\* `3`. \* Returns: {RecordableHistogram} Returns a {RecordableHistogram}. ## `perf\_hooks.eventLoopUtilization([utilization1[, utilization2]])` \* `utilization1` {Object} The result of a previous call to `eventLoopUtilization()`. \* `utilization2` {Object} The result of a pr... | https://github.com/nodejs/node/blob/main//doc/api/perf_hooks.md | main | nodejs | [
-0.02445300482213497,
0.009450284764170647,
-0.04451795294880867,
0.04118023440241814,
0.0002586794726084918,
-0.054726939648389816,
0.11565841734409332,
0.021811801940202713,
0.041197266429662704,
-0.015911614522337914,
0.009487802162766457,
-0.011785009875893593,
-0.017795247957110405,
-... | 0.169848 |
{RecordableHistogram} A histogram object created using `perf\_hooks.createHistogram()` that will record runtime durations in nanoseconds. \_This property is an extension by Node.js. It is not available in Web browsers.\_ Wraps a function within a new function that measures the running time of the wrapped function. A `P... | https://github.com/nodejs/node/blob/main//doc/api/perf_hooks.md | main | nodejs | [
0.0421147383749485,
0.05917924642562866,
-0.04541796073317528,
0.03880685195326805,
0.01666177064180374,
-0.011446364223957062,
0.03897390514612198,
0.045476049184799194,
0.020849505439400673,
-0.020836832001805305,
-0.06340207159519196,
-0.03541329503059387,
-0.011793744750320911,
-0.0298... | 0.144303 |
{RecordableHistogram} Adds the values from `other` to this histogram. ### `histogram.record(val)` \* `val` {number|bigint} The amount to record in the histogram. ### `histogram.recordDelta()` Calculates the amount of time (in nanoseconds) that has passed since the previous call to `recordDelta()` and records that amoun... | https://github.com/nodejs/node/blob/main//doc/api/perf_hooks.md | main | nodejs | [
0.00607991311699152,
0.10013846307992935,
-0.08275890350341797,
0.08371997624635696,
-0.06647796183824539,
-0.016961848363280296,
0.009137812070548534,
0.032321661710739136,
0.02340538613498211,
-0.07180912792682648,
-0.08620372414588928,
0.017174014821648598,
0.006113703828305006,
-0.0880... | 0.07888 |
{ console.log(item); }); }); obs.observe({ entryTypes: ['net'] }); const PORT = 8080; createServer((socket) => { socket.destroy(); }).listen(PORT, () => { connect(PORT); }); ``` ```cjs 'use strict'; const { PerformanceObserver } = require('node:perf\_hooks'); const net = require('node:net'); const obs = new Performance... | https://github.com/nodejs/node/blob/main//doc/api/perf_hooks.md | main | nodejs | [
-0.03481829911470413,
0.059721820056438446,
-0.037207022309303284,
0.052334945648908615,
-0.03006690926849842,
-0.06855729222297668,
0.064482681453228,
-0.014217235147953033,
0.0713295266032219,
0.022315166890621185,
-0.04648972675204277,
-0.003562884172424674,
-0.06587335467338562,
-0.025... | 0.082233 |
# Trace events > Stability: 1 - Experimental The `node:trace\_events` module provides a mechanism to centralize tracing information generated by V8, Node.js core, and userspace code. Tracing can be enabled with the `--trace-event-categories` command-line flag or by using the `node:trace\_events` module. The `--trace-ev... | https://github.com/nodejs/node/blob/main//doc/api/tracing.md | main | nodejs | [
-0.024928158149123192,
-0.03699924424290657,
-0.042380187660455704,
0.09445595741271973,
0.13107484579086304,
-0.05670994892716408,
0.010744395665824413,
-0.025131162256002426,
0.03689618408679962,
-0.03737763315439224,
-0.03337825462222099,
0.005009045358747244,
-0.06276539713144302,
-0.0... | 0.117817 |
such as: ```js process.on('SIGINT', function onSigint() { console.info('Received SIGINT.'); process.exit(130); // Or applicable exit code depending on OS and signal }); ``` The tracing system uses the same time source as the one used by `process.hrtime()`. However the trace-event timestamps are expressed in microsecond... | https://github.com/nodejs/node/blob/main//doc/api/tracing.md | main | nodejs | [
-0.03266077861189842,
-0.0029365750961005688,
-0.027211805805563927,
0.06720510125160217,
0.096824049949646,
-0.09187020361423492,
0.021688057109713554,
-0.003383174305781722,
0.09982020407915115,
-0.04416052997112274,
-0.012294868007302284,
0.0031007195357233286,
-0.11183861643075943,
-0.... | 0.120725 |
{ if (err) reject(new Error(JSON.stringify(err))); else resolve(result); }); }); } async function collect() { const data = []; session.on('NodeTracing.dataCollected', (chunk) => data.push(chunk)); session.on('NodeTracing.tracingComplete', () => { // done }); const traceConfig = { includedCategories: ['v8'] }; await pos... | https://github.com/nodejs/node/blob/main//doc/api/tracing.md | main | nodejs | [
-0.054968565702438354,
0.10063812881708145,
-0.018843749538064003,
0.063177190721035,
0.025982175022363663,
-0.04963124915957451,
-0.007521739229559898,
0.007615464273840189,
0.020468777045607567,
-0.037823788821697235,
0.002761753275990486,
-0.04475710168480873,
-0.0628911703824997,
-0.04... | 0.044359 |
# Modules: ECMAScript modules > Stability: 2 - Stable ## Introduction ECMAScript modules are [the official standard format][] to package JavaScript code for reuse. Modules are defined using a variety of [`import`][] and [`export`][] statements. The following example of an ES module exports a function: ```js // addTwo.m... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.0665920153260231,
-0.04415314272046089,
0.0037456948775798082,
0.06553501635789871,
0.10172631591558456,
-0.014361746609210968,
-0.0065137119963765144,
0.061716120690107346,
0.03310055658221245,
-0.03638715669512749,
0.015803011134266853,
0.03983728215098381,
-0.01201145350933075,
-0.00... | 0.216856 |
URLs. This means that special characters must be [percent-encoded][], such as `#` with `%23` and `?` with `%3F`. `file:`, `node:`, and `data:` URL schemes are supported. A specifier like `'https://example.com/app.js'` is not supported natively in Node.js unless using a [custom HTTPS loader][]. #### `file:` URLs Modules... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.06722032278776169,
-0.00645886454731226,
0.033604029566049576,
-0.008563525974750519,
-0.012873119674623013,
-0.06453264504671097,
-0.048421479761600494,
0.0984102189540863,
0.0803031250834465,
-0.031364209949970245,
-0.04834486171603203,
0.031744588166475296,
0.04539492726325989,
0.026... | 0.029504 |
## `import.meta` \* Type: {Object} The `import.meta` meta property is an `Object` that contains the following properties. It is only supported in ES modules. ### `import.meta.dirname` \* Type: {string} The directory name of the current module. This is the same as the [`path.dirname()`][] of the [`import.meta.filename`]... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.013045250438153744,
-0.018547840416431427,
-0.022154994308948517,
0.008136752992868423,
0.08607278019189835,
-0.04404091835021973,
0.028221290558576584,
0.08070910722017288,
-0.03439067676663399,
-0.03484448045492172,
0.021436870098114014,
0.021197933703660965,
-0.009791438467800617,
0.... | 0.086299 |
namespaces must be constructed prior to the evaluation of the CJS module. These CommonJS namespace objects also provide the `default` export as a `'module.exports'` named export, in order to unambiguously indicate that their representation in CommonJS uses this value, and not the namespace value. This mirrors the seman... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.12144304066896439,
-0.07579365372657776,
-0.023761611431837082,
0.0734955444931984,
0.033754993230104446,
-0.040798306465148926,
0.009286330081522465,
0.033470623195171356,
0.013190796598792076,
-0.05860212445259094,
-0.008197493851184845,
-0.06236725673079491,
0.002701071323826909,
0.0... | 0.112713 |
used by `import` as the ES module loader has its own separate cache. ## JSON modules JSON files can be referenced by `import`: ```js import packageConfig from './package.json' with { type: 'json' }; ``` The `with { type: 'json' }` syntax is mandatory; see [Import Attributes][]. The imported JSON only exposes a `default... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.11733078956604004,
-0.03242890164256096,
-0.005123336333781481,
0.003374675754457712,
0.06986768543720245,
-0.028160152956843376,
0.0008988851914182305,
0.016819333657622337,
-0.003368299687281251,
-0.01170861441642046,
0.026611844077706337,
0.03135521337389946,
-0.03652535751461983,
0.... | 0.160385 |
use import module names or import/export names that start with reserved prefixes: \* `wasm-js:` - reserved in all module import names, module names and export names. \* `wasm:` - reserved in module import names and export names (imported module names are allowed in order to support future builtin polyfills). Importing ... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.06856371462345123,
-0.0016405114438384771,
0.018356993794441223,
0.07400777190923691,
0.058342911303043365,
-0.006139323115348816,
-0.04839641600847244,
0.07989711314439774,
-0.006896513048559427,
0.007370406296104193,
-0.020652493461966515,
-0.04316297546029091,
0.028524592518806458,
0... | 0.076669 |
an invalid URL, package name or package subpath specifier. \* \_Invalid Package Configuration\_: package.json configuration is invalid or contains an invalid configuration. \* \_Invalid Package Target\_: Package exports or imports define a target module for the package that is an invalid type or string target. \* \_Pac... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.06986156851053238,
-0.04390431195497513,
0.030855106189846992,
-0.04406594857573509,
-0.002550808247178793,
-0.03808347508311272,
-0.008321118541061878,
0.07961082458496094,
-0.05825178325176239,
0.0029795828741043806,
0.023826677352190018,
-0.05459942668676376,
-0.0017055163625627756,
... | 0.094901 |
\_packageURL\_ be the URL resolution of \_"node\\_modules/"\_ > concatenated with \_packageName\_, relative to \_parentURL\_. > 2. Set \_parentURL\_ to the parent folder URL of \_parentURL\_. > 3. If the folder at \_packageURL\_ does not exist, then > 1. Continue the next loop iteration. > 4. Let \_pjson\_ be the resul... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.038708388805389404,
0.017831526696681976,
0.0386299267411232,
-0.031844839453697205,
0.048392586410045624,
-0.009507774375379086,
0.01260452251881361,
0.07186360657215118,
0.013360916636884212,
-0.0405244305729866,
0.11863739043474197,
-0.022580144926905632,
-0.027049260213971138,
0.012... | -0.03511 |
\_target\_ be the value of \_matchObj\_\[\_matchKey\_]. > 2. Return the result of \*\*PACKAGE\\_TARGET\\_RESOLVE\*\*(\_packageURL\_, > \_target\_, \*\*null\*\*, \_isImports\_, \_conditions\_). > 3. Let \_expansionKeys\_ be the list of keys of \_matchObj\_ containing only a > single \_"\\*"\_, sorted by the sorting func... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.018831342458724976,
0.027542730793356895,
0.06687823683023453,
-0.058412134647369385,
-0.05269705131649971,
0.018669921904802322,
0.08216450363397598,
0.038387298583984375,
-0.06774896383285522,
0.027633490040898323,
0.0016089624259620905,
-0.06165933981537819,
0.045652907341718674,
-0.... | 0.068099 |
\_"default"\_ or \_conditions\_ contains an entry for \_p\_, > then > 1. Let \_targetValue\_ be the value of the \_p\_ property in \_target\_. > 2. Let \_resolved\_ be the result of \*\*PACKAGE\\_TARGET\\_RESOLVE\*\*( > \_packageURL\_, \_targetValue\_, \_patternMatch\_, \_isImports\_, > \_conditions\_). > 3. If \_resol... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.026284057646989822,
0.0647270530462265,
-0.0016364908078685403,
-0.004824372474104166,
-0.025705283507704735,
-0.00865343026816845,
0.10441544651985168,
0.008967287838459015,
-0.049784403294324875,
-0.02421693317592144,
0.022121487185359,
-0.07912160456180573,
-0.006939746905118227,
-0.... | 0.071308 |
contains a top-level lexical declaration (`const`, `let`, > or `class`) of any of the CommonJS wrapper variables (`require`, > `exports`, `module`, `\_\_filename`, or `\_\_dirname`) then return \*\*true\*\*. > 3. Else return \*\*false\*\*. ### Customizing ESM specifier resolution algorithm [Module customization hooks][... | https://github.com/nodejs/node/blob/main//doc/api/esm.md | main | nodejs | [
-0.021477842703461647,
0.007488431874662638,
0.034186217933893204,
0.01155165396630764,
0.07138056308031082,
-0.063120998442173,
-0.006949991453438997,
0.030481180176138878,
-0.042791251093149185,
0.01570654846727848,
-0.013430251739919186,
0.0026914614718407393,
-0.007745730224996805,
0.0... | 0.154859 |
# About this documentation Welcome to the official API reference documentation for Node.js! Node.js is a JavaScript runtime built on the [V8 JavaScript engine][]. ## Contributing Report errors in this documentation in [the issue tracker][]. See [the contributing guide][] for directions on how to submit pull requests. #... | https://github.com/nodejs/node/blob/main//doc/api/documentation.md | main | nodejs | [
-0.048651546239852905,
-0.010997778736054897,
0.035166364163160324,
0.05956641957163811,
0.08562659472227097,
-0.025782275944948196,
-0.12311645597219467,
0.025363534688949585,
-0.0764101892709732,
-0.01448400691151619,
-0.05889443680644035,
0.0962047427892685,
-0.0389450378715992,
-0.0844... | 0.081975 |
# Console > Stability: 2 - Stable The `node:console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. The module exports two specific components: \* A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` tha... | https://github.com/nodejs/node/blob/main//doc/api/console.md | main | nodejs | [
-0.011594424955546856,
-0.021868811920285225,
-0.01944529451429844,
0.05513899400830269,
0.13284580409526825,
-0.0373120978474617,
-0.03609495609998703,
0.08691086620092392,
0.04157190024852753,
-0.011215905658900738,
-0.06483466178178787,
0.03565612807869911,
0.008522569201886654,
-0.0476... | 0.060572 |
// Alternatively // const { Console } = console; const output = createWriteStream('./stdout.log'); const errorOutput = createWriteStream('./stderr.log'); // Custom simple logger const logger = new Console({ stdout: output, stderr: errorOutput }); // use it like console const count = 5; logger.log('count: %d', count); /... | https://github.com/nodejs/node/blob/main//doc/api/console.md | main | nodejs | [
0.02709469199180603,
0.046701472252607346,
-0.014581411145627499,
0.037228915840387344,
-0.0000114935437522945,
0.017541948705911636,
-0.03883681446313858,
0.13245879113674164,
0.06543058156967163,
0.025444036349654198,
-0.038527969270944595,
-0.041239216923713684,
0.014320071786642075,
-0... | 0.060828 |
with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to [`util.format()`][]). ```js const code = 5; console.error('error #%d', code); // Prints: error #5, to stderr console.error('erro... | https://github.com/nodejs/node/blob/main//doc/api/console.md | main | nodejs | [
-0.048083070665597916,
0.028014788404107094,
0.0036532259546220303,
0.039575956761837006,
-0.0002726947423070669,
0.028107495978474617,
0.05275924503803253,
0.04520794004201889,
0.04165713116526604,
-0.06009215489029884,
-0.007229739334434271,
-0.0030872100032866,
-0.008045862428843975,
-0... | 0.065753 |
```js console.trace('Show me'); // Prints: (stack trace will vary based on where trace is called) // Trace: Show me // at repl:2:9 // at REPLServer.defaultEval (repl.js:248:27) // at bound (domain.js:287:14) // at REPLServer.runBound [as eval] (domain.js:300:12) // at REPLServer. (repl.js:412:12) // at emitOne (events.... | https://github.com/nodejs/node/blob/main//doc/api/console.md | main | nodejs | [
-0.08838636428117752,
-0.028949635103344917,
-0.030431151390075684,
0.025507710874080658,
0.09093930572271347,
-0.07854104042053223,
0.03578338772058487,
0.014629719778895378,
0.09661533683538437,
-0.018502958118915558,
0.0034262987319380045,
0.010583898983895779,
-0.08012837916612625,
-0.... | 0.096329 |
# Modules: Packages ## Introduction A package is a folder tree described by a `package.json` file. The package consists of the folder containing the `package.json` file and all subfolders until the next folder containing another `package.json` file, or a folder named `node\_modules`. This page provides guidance for pac... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.08689867705106735,
0.007850089110434055,
0.00955816637724638,
0.03432018682360649,
0.11364065855741501,
-0.04439668729901314,
0.04890310764312744,
0.08863891661167145,
0.01465260237455368,
-0.04533977806568146,
0.039220649749040604,
0.09144388884305954,
0.037736453115940094,
0.024890312... | 0.150231 |
`export` statements. \* `import.meta` references. \* `await` at the top level of a module. \* Lexical redeclarations of the CommonJS wrapper variables (`require`, `module`, `exports`, `\_\_dirname`, `\_\_filename`). ### Module resolution and loading Node.js has two types of module resolution and loading, chosen based o... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.08433514833450317,
-0.023320065811276436,
0.047889478504657745,
0.05646843463182449,
0.10186391323804855,
-0.04585682973265648,
-0.05015133321285248,
0.04221446067094803,
0.022673213854432106,
-0.023280790075659752,
-0.005020368378609419,
0.01433776319026947,
-0.06065025553107262,
0.025... | 0.078893 |
// and therefore inherits the "type" value from one level up. import 'commonjs-package'; // Loaded as CommonJS since ./node\_modules/commonjs-package/package.json // lacks a "type" field or contains "type": "commonjs". import './node\_modules/commonjs-package/index.js'; // Loaded as CommonJS since ./node\_modules/commo... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.07776746898889542,
0.010323625057935715,
0.06645020097494125,
-0.037089791148900986,
0.0992981418967247,
0.03313172981142998,
-0.04531722143292427,
0.08282957226037979,
-0.020752856507897377,
-0.030217895284295082,
0.04332056641578674,
0.037726327776908875,
-0.03175977244973183,
0.06808... | 0.067413 |
the `package.json` could use the following `package.exports`: ```json { "name": "my-package", "exports": { ".": "./lib/index.js", "./lib": "./lib/index.js", "./lib/index": "./lib/index.js", "./lib/index.js": "./lib/index.js", "./feature": "./feature/index.js", "./feature/index": "./feature/index.js", "./feature/index.j... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.07967036217451096,
-0.023672284558415413,
0.044550251215696335,
-0.002000231761485338,
0.09990037977695465,
-0.010280124843120575,
-0.01864159107208252,
0.04534263163805008,
-0.028806013986468315,
-0.02209942601621151,
0.03239021822810173,
-0.01525003369897604,
-0.03101542964577675,
0.0... | -0.010316 |
values associated with export keys) must be relative URL strings starting with `./`. ```json // package.json { "name": "my-package", "exports": { ".": "./dist/main.js", // Correct "./feature": "./lib/feature.js", // Correct // "./origin-relative": "/dist/main.js", // Incorrect: Must start with ./ // "./absolute": "file... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.0930718407034874,
-0.0017932645278051496,
0.045039910823106766,
-0.038930609822273254,
0.0918494462966919,
-0.013552919030189514,
-0.010174925439059734,
0.06032000109553337,
0.0037080394104123116,
-0.0010066566755995154,
0.060628488659858704,
-0.016075434163212776,
-0.022058069705963135,
... | -0.00644 |
since the individual exports for a package can be determined by treating the right hand side target pattern as a `\*\*` glob against the list of files within the package. Because `node\_modules` paths are forbidden in exports targets, this expansion is dependent on only the files of the package itself. To exclude priva... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.03917619585990906,
-0.012031467631459236,
0.07189464569091797,
0.02103124000132084,
0.15101276338100433,
0.0031495008151978254,
0.03635093942284584,
0.02275724895298481,
0.007922016084194183,
-0.021939842030405998,
0.08559590578079224,
-0.031581345945596695,
-0.007846320979297161,
0.051... | 0.048891 |
where `require('pkg/feature.js')` and `import 'pkg/feature.js'` could provide different implementations between Node.js and other JS environments. When using environment branches, always include a `"default"` condition where possible. Providing a `"default"` condition ensures that any unknown JS environments are able t... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.05676385760307312,
0.0020039917435497046,
0.06181400269269943,
0.017878800630569458,
0.08494465053081512,
-0.015448486432433128,
-0.060993291437625885,
0.07450947165489197,
-0.005857070907950401,
-0.009356935508549213,
0.00936232041567564,
0.014392325654625893,
0.00933736190199852,
0.06... | -0.002041 |
here are that: \* The definition should be clear and unambiguous for all implementers. \* The use case for why the condition is needed should be clearly justified. \* There should exist sufficient existing implementation usage. \* The condition name should not conflict with another condition definition or condition in ... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.16155964136123657,
0.04338507354259491,
0.0562623031437397,
-0.04630783200263977,
0.05174745246767998,
0.00922438409179449,
0.017985675483942032,
0.07139761745929718,
-0.05474201962351799,
-0.008353735320270061,
-0.01766354776918888,
-0.012284817174077034,
0.035314157605171204,
-0.03862... | 0.188723 |
be used in addition to the [`"exports"`][] field to [self-reference][] a package using its name. ### `"main"` \* Type: {string} ```json { "main": "./index.js" } ``` The `"main"` field defines the entry point of a package when imported by name via a `node\_modules` lookup. Its value is a path. When a package has an [`"e... | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.09082197397947311,
0.03172043710947037,
-0.05132661759853363,
-0.018231702968478203,
0.09096331894397736,
0.008711147122085094,
0.028643742203712463,
0.08255703002214432,
0.03450281172990799,
-0.03635994344949722,
-0.018250491470098495,
0.07858116179704666,
-0.03106802888214588,
0.00117... | 0.096162 |
[subpath imports]: #subpath-imports [the dual CommonJS/ES module packages section]: #dual-commonjses-module-packages [the full specifier path]: esm.md#mandatory-file-extensions [the package examples repository]: https://github.com/nodejs/package-examples | https://github.com/nodejs/node/blob/main//doc/api/packages.md | main | nodejs | [
-0.02876201458275318,
-0.06824279576539993,
0.044548217207193375,
-0.03383898735046387,
0.1249489113688469,
0.012285708449780941,
-0.045242998749017715,
0.052555300295352936,
-0.04590943455696106,
0.006210516672581434,
-0.03233085572719574,
0.0069472575560212135,
-0.03545452281832695,
0.03... | 0.11404 |
# HTTP/2 > Stability: 2 - Stable The `node:http2` module provides an implementation of the [HTTP/2][] protocol. It can be accessed using: ```js const http2 = require('node:http2'); ``` ## Determining if crypto support is unavailable It is possible for Node.js to be built without including support for the `node:crypto` ... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.08762390166521072,
-0.008550201542675495,
-0.0072602443397045135,
0.008517125621438026,
0.07394813001155853,
-0.052068229764699936,
-0.0834648534655571,
0.017178164795041084,
-0.009066454134881496,
-0.036946579813957214,
-0.008470476604998112,
0.04142075404524803,
0.009878977201879025,
... | 0.06594 |
chunk; }); req.on('end', () => { console.log(`\n${data}`); client.close(); }); req.end(); ``` ### Class: `Http2Session` \* Extends: {EventEmitter} Instances of the `http2.Http2Session` class represent an active communications session between an HTTP/2 client and server. Instances of this class are \_not\_ intended to b... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.01241982914507389,
0.062270957976579666,
0.0261386651545763,
0.029420562088489532,
0.011849269270896912,
-0.10128521919250488,
0.03754773736000061,
0.005225066095590591,
0.10622692853212357,
0.002789901802316308,
0.006337076425552368,
0.04562337324023247,
-0.0744740441441536,
-0.0302406... | 0.064278 |
`'localSettings'` event is emitted when an acknowledgment `SETTINGS` frame has been received. When using `http2session.settings()` to submit new settings, the modified settings do not take effect until the `'localSettings'` event is emitted. ```js session.settings({ enablePush: false }); session.on('localSettings', (se... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
0.019763663411140442,
-0.003248833818361163,
0.006551716011017561,
0.07824087888002396,
-0.00034554090234450996,
-0.035087741911411285,
0.030468443408608437,
-0.0036999217700213194,
0.0466570183634758,
0.04059918224811554,
0.024470211938023567,
-0.0011364066740497947,
-0.03324833884835243,
... | 0.015738 |
`error` {Error} An `Error` object if the `Http2Session` is being destroyed due to an error. \* `code` {number} The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL\_ERROR`, otherwise defaults to `NO\_ERROR`. Immediately terminates the `Http2Se... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.044495563954114914,
0.00267549860291183,
-0.012945596128702164,
0.006452402099967003,
0.03160630166530609,
-0.0788455531001091,
0.014287148602306843,
-0.02081950753927231,
0.1204010397195816,
0.021073319017887115,
-0.00500117614865303,
0.026813708245754242,
0.0132822934538126,
0.0510590... | 0.094647 |
endpoint's window size. The `windowSize` is the total window size to set, not the delta. ```mjs import { createServer } from 'node:http2'; const server = createServer(); const expectedWindowSize = 2 \*\* 20; server.on('session', (session) => { // Set local window size to be 2 \*\* 20 session.setLocalWindowSize(expected... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
0.04014739394187927,
0.04688799008727074,
0.025695761665701866,
0.006966819986701012,
-0.05451597273349762,
-0.04339925944805145,
-0.05588241294026375,
0.09298571199178696,
0.013388709165155888,
0.026055796071887016,
-0.03551366925239563,
-0.007223782129585743,
-0.062133971601724625,
-0.04... | -0.000875 |
[RFC 7838][]. \* `originOrStream` {number|string|URL|Object} Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the `http2stream.id` property. Submits an `ALTSVC` frame (as defined by [RFC 7838][]) to the connected client... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.007568609435111284,
0.00924795214086771,
-0.013725938275456429,
-0.05067846551537514,
-0.038788508623838425,
-0.0842919871211052,
-0.05766413360834122,
0.03460696339607239,
0.10219047963619232,
0.0057978820987045765,
-0.028121760115027428,
-0.0032871796283870935,
0.010964243672788143,
0... | 0.010845 |
cannot be parsed as a URL or if a valid origin cannot be derived. A `URL` object, or any object with an `origin` property, may be passed as an `origin`, in which case the value of the `origin` property will be used. The value of the `origin` property \_must\_ be a properly serialized ASCII origin. Alternatively, the `o... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.028499094769358635,
0.056048501282930374,
-0.026339735835790634,
-0.03009951300919056,
-0.0459413081407547,
-0.1186516284942627,
-0.09876808524131775,
0.03817611187696457,
0.047526054084300995,
-0.023522762581706047,
0.006021510809659958,
-0.07692398875951767,
0.021898193284869194,
0.02... | -0.044845 |
connect, constants } from 'node:http2'; const clientSession = connect('https://localhost:1234'); const { HTTP2\_HEADER\_PATH, HTTP2\_HEADER\_STATUS, } = constants; const req = clientSession.request({ [HTTP2\_HEADER\_PATH]: '/' }); req.on('response', (headers) => { console.log(headers[HTTP2\_HEADER\_STATUS]); req.on('da... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.051348790526390076,
0.11648184806108475,
0.02935970574617386,
-0.028192704543471336,
-0.04809582605957985,
-0.0747431218624115,
-0.05692222714424133,
0.04805576056241989,
0.03158247470855713,
-0.013308493420481682,
-0.05634220317006111,
-0.03810335323214531,
-0.041693128645420074,
-0.02... | 0.003757 |
yet ready for use. ##### Destruction All [`Http2Stream`][] instances are destroyed either when: \* An `RST\_STREAM` frame for the stream is received by the connected peer, and (for client streams only) pending data has been read. \* The `http2stream.close()` method is called, and (for client streams only) pending data ... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.04475579410791397,
0.025513701140880585,
-0.011526119895279408,
-0.005287699401378632,
0.017019430175423622,
-0.08040479570627213,
-0.03413419425487518,
0.03499670699238777,
0.03805893287062645,
0.006327193696051836,
-0.04789397120475769,
0.10327909886837006,
-0.015211177058517933,
0.00... | 0.073862 |
`waitForTrailers` option must be set for this event to be emitted. #### `http2stream.aborted` \* Type: {boolean} Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, the `'aborted'` event will have been emitted. #### `http2stream.bufferSize` \* Type: {number} This property shows the number of c... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.01644567959010601,
0.007619614712893963,
-0.045784931629896164,
0.01374503131955862,
0.035551272332668304,
0.003141202498227358,
-0.047420989722013474,
0.04027106985449791,
0.07981985062360764,
0.012771189212799072,
-0.03599122539162636,
0.017080780118703842,
-0.06672578305006027,
0.000... | 0.001671 |
Legacy property, always set to `16`. A current state of this `Http2Stream`. #### `http2stream.sendTrailers(headers)` \* `headers` {HTTP/2 Headers Object} Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method will cause the `Http2Stream` to be immediately closed and must only be called after the `'w... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.019087687134742737,
0.051265474408864975,
0.011090229265391827,
-0.00014992286742199212,
0.041630957275629044,
-0.058045994490385056,
-0.08082893490791321,
0.029225913807749748,
0.08450715243816376,
-0.003330834675580263,
-0.01758824661374092,
0.033405423164367676,
-0.06235402077436447,
... | -0.017804 |
Type: {boolean} Read-only property mapped to the `SETTINGS\_ENABLE\_PUSH` flag of the remote client's most recent `SETTINGS` frame. Will be `true` if the remote peer accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. #### `http2stream.pushStream(headers[, ... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.06870731711387634,
-0.01782081462442875,
-0.016173819079995155,
0.013117121532559395,
0.03587082028388977,
-0.06280544400215149,
-0.05433914437890053,
0.033620964735746384,
0.07157520949840546,
-0.022492635995149612,
0.028490860015153885,
0.039043210446834564,
-0.019687924534082413,
0.0... | -0.022621 |
#### `http2stream.respondWithFD(fd[, headers[, options]])` \* `fd` {number|FileHandle} A readable file descriptor. \* `headers` {HTTP/2 Headers Object} \* `options` {Object} \* `statCheck` {Function} \* `waitForTrailers` {boolean} When `true`, the `Http2Stream` will emit the `'wantTrailers'` event after the final `DATA... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.05201569199562073,
0.04325471073389053,
-0.08777808398008347,
-0.008031822741031647,
0.07449851185083389,
-0.07096303254365921,
-0.017920317128300667,
0.09831283241510391,
0.07861126959323883,
0.014255138114094734,
-0.01093224249780178,
0.012961715459823608,
-0.03795083239674568,
0.0046... | 0.097539 |
fs.closeSync(fd)); }); ``` #### `http2stream.respondWithFile(path[, headers[, options]])` \* `path` {string|Buffer|URL} \* `headers` {HTTP/2 Headers Object} \* `options` {Object} \* `statCheck` {Function} \* `onError` {Function} Callback function invoked in the case of an error before send. \* `waitForTrailers` {boolea... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.059797823429107666,
0.04931718483567238,
-0.09640461951494217,
0.030267303809523582,
0.04769406095147133,
-0.07491867989301682,
-0.020206695422530174,
0.10893836617469788,
0.08622682839632034,
0.020096398890018463,
-0.03908626362681389,
0.019314296543598175,
-0.03718535229563713,
-0.038... | 0.084562 |
to destroy the stream. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event will be emitted immediately after queuing the last chunk of payload data to be sent. The `http2stream.sendTrailers()` method can then be used to sent trailing header fields to the peer. When `options.waitForTrailers` is ... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.018615033477544785,
0.08508320152759552,
0.024112097918987274,
0.013001255691051483,
0.08168710768222809,
-0.07380928099155426,
-0.04295147582888603,
0.03804207965731621,
0.10648803412914276,
0.0014374457532539964,
-0.03584858402609825,
0.043376341462135315,
-0.0431789867579937,
-0.0042... | 0.005146 |
=> { const method = headers[HTTP2\_HEADER\_METHOD]; const path = headers[HTTP2\_HEADER\_PATH]; // ... stream.respond({ [HTTP2\_HEADER\_STATUS]: 200, [HTTP2\_HEADER\_CONTENT\_TYPE]: 'text/plain; charset=utf-8', }); stream.write('hello '); stream.end('world'); }); ``` #### Event: `'timeout'` The `'timeout'` event is emit... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.005255780182778835,
0.09107828885316849,
-0.006390334572643042,
0.026379529386758804,
0.02256445214152336,
-0.06016598641872406,
-0.06094897910952568,
0.056382082402706146,
0.09721320122480392,
-0.0010545168770477176,
-0.07337083667516708,
0.020420296117663383,
-0.05586262792348862,
-0.... | 0.090726 |
\* `error` {Error} \* `session` {ServerHttp2Session} The `'sessionError'` event is emitted when an `'error'` event is emitted by an `Http2Session` object associated with the `Http2SecureServer`. #### Event: `'stream'` \* `stream` {Http2Stream} A reference to the stream \* `headers` {HTTP/2 Headers Object} An object des... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.0332784578204155,
0.10018618404865265,
-0.01723272167146206,
-0.009332339279353619,
0.049209270626306534,
-0.08893351256847382,
0.02343231439590454,
0.04197302088141441,
0.0315188467502594,
0.02092222310602665,
-0.027924450114369392,
-0.072065070271492,
0.019514089450240135,
0.040132597... | 0.080991 |
on incoming connections. The socket timeout logic is set up on connection, so changing this value only affects new connections to the server, not any existing connections. #### `server.updateSettings([settings])` \* `settings` {HTTP/2 Settings Object} Used to update the server with the provided settings. Throws `ERR\_H... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.014734916388988495,
-0.005553801078349352,
-0.0720634013414383,
0.05994318425655365,
-0.08277201652526855,
-0.06352819502353668,
-0.0575060173869133,
0.023377254605293274,
-0.025359798222780228,
0.044047001749277115,
-0.008256680332124233,
-0.0018802732229232788,
0.04745946079492569,
-0... | -0.012238 |
connection. \* `streamResetBurst` {number} and `streamResetRate` {number} Sets the rate limit for the incoming stream reset (RST\\_STREAM frame). Both settings must be set to have any effect, and default to 1000 and 33 respectively. \* `remoteCustomSettings` {Array} The array of integer values determines the settings t... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
0.0017873821780085564,
-0.04554499685764313,
-0.036957997828722,
0.014298363588750362,
-0.03322910889983177,
-0.017589224502444267,
-0.03399514779448509,
-0.0017549180192872882,
0.030971860513091087,
-0.000204462165129371,
-0.022760184481739998,
0.02367614582180977,
-0.010096942074596882,
... | -0.021841 |
maximum number of header entries. This is similar to [`server.maxHeadersCount`][] or [`request.maxHeadersCount`][] in the `node:http` module. The minimum value is `4`. \*\*Default:\*\* `128`. \* `maxOutstandingPings` {number} Sets the maximum number of outstanding, unacknowledged pings. \*\*Default:\*\* `10`. \* `maxSe... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.03178010880947113,
0.06725065410137177,
-0.05698516592383385,
-0.016716012731194496,
0.02677875943481922,
-0.06357879191637039,
-0.026111066341400146,
0.04048549756407738,
0.00011155766696901992,
0.019267922267317772,
-0.05759314447641373,
-0.002304906491190195,
0.037134960293769836,
-0... | 0.12071 |
(stream, headers) => { stream.respond({ 'content-type': 'text/html; charset=utf-8', ':status': 200, }); stream.end(' # Hello World '); }); server.listen(8443); ``` ```cjs const http2 = require('node:http2'); const fs = require('node:fs'); const options = { key: fs.readFileSync('server-key.pem'), cert: fs.readFileSync('... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.02369374781847,
0.0825905054807663,
-0.07220113277435303,
-0.03398323431611061,
0.027440886944532394,
-0.08629810810089111,
-0.062014974653720856,
0.0706869587302208,
0.04354310408234596,
-0.02435043267905712,
-0.02622593753039837,
-0.02884007804095745,
-0.010339128784835339,
0.03877140... | -0.039701 |
be overridden if the remote peer sets its own value for `maxConcurrentStreams`. \*\*Default:\*\* `100`. \* `protocol` {string} The protocol to connect with, if not set in the `authority`. Value may be either `'http:'` or `'https:'`. \*\*Default:\*\* `'https:'` \* `settings` {HTTP/2 Settings Object} The initial settings... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.003667504293844104,
0.0036018318496644497,
-0.05454730987548828,
0.018131976947188377,
-0.10214893519878387,
-0.026223119348287582,
-0.0283365361392498,
0.01982392929494381,
-0.037878021597862244,
0.0374903604388237,
-0.01695486530661583,
0.007200402207672596,
0.04120590537786484,
0.039... | -0.07581 |
`Buffer` as generated by `http2.getPackedSettings()`. ### `http2.performServerHandshake(socket[, options])` \* `socket` {stream.Duplex} \* `options` {Object} Any [`http2.createServer()`][] option can be provided. \* Returns: {ServerHttp2Session} Create an HTTP/2 server session from an existing socket. ### `http2.sensit... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.042637888342142105,
0.061682119965553284,
-0.020217476412653923,
0.0255400650203228,
-0.021226517856121063,
-0.05658118426799774,
0.017103981226682663,
0.049756161868572235,
0.020401528105139732,
-0.030417369678616524,
-0.05366327241063118,
-0.014092079363763332,
0.008424866944551468,
0... | 0.047789 |
be set as a property on the array, like `rawHeadersArray[http2.sensitiveHeaders] = ['cookie']`, not as a separate key and value pair within the array itself. ### Settings object The `http2.getDefaultSettings()`, `http2.getPackedSettings()`, `http2.createServer()`, `http2.createSecureServer()`, `http2session.settings()`... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.012702349573373795,
0.04079999774694443,
-0.08456536382436752,
0.029417257755994797,
-0.01636972837150097,
-0.06761538982391357,
-0.028572674840688705,
0.041119497269392014,
-0.052255865186452866,
-0.002802743576467037,
-0.03875601664185524,
-0.016639195382595062,
0.025524413213133812,
... | -0.038053 |
`Http2Stream`, `Http2Session` or HTTP/2 Server objects, depending on where and when the error occurs. Internal errors occur when an HTTP/2 session fails unexpectedly. These will be reported via an `'error'` event on the `Http2Session` or HTTP/2 Server objects. Protocol errors occur when various HTTP/2 protocol constrai... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.06277062743902206,
0.04617544263601303,
0.06596513837575912,
-0.005115462467074394,
0.013293660245835781,
-0.06392432004213333,
-0.05347658321261406,
0.024399587884545326,
0.06989909708499908,
0.001208932721056044,
-0.03470894694328308,
-0.006728894077241421,
0.011609003879129887,
0.035... | 0.050771 |
=> { if (headers[':method'] !== 'CONNECT') { // Only accept CONNECT requests stream.close(NGHTTP2\_REFUSED\_STREAM); return; } const auth = new URL(`tcp://${headers[':authority']}`); // It's a very good idea to verify that hostname and port are // things this proxy should be connecting to. const socket = net.connect(au... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.05605156719684601,
0.09035155177116394,
0.015349277295172215,
-0.027198759838938713,
-0.03469831496477127,
-0.043681930750608444,
-0.024706924334168434,
0.017015673220157623,
0.012918863445520401,
-0.005088462959975004,
-0.06961548328399658,
-0.023071499541401863,
0.015375490300357342,
... | 0.004873 |
at API compatibility with HTTP/1, but they do not hide the differences between the protocols. As an example, the status message for HTTP codes is ignored. ### ALPN negotiation ALPN negotiation allows supporting both [HTTPS][] and HTTP/2 over the same socket. The `req` and `res` objects can be either HTTP/1 or HTTP/2, a... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.10878286510705948,
0.030391814187169075,
0.0013390076346695423,
0.013548774644732475,
-0.011900081299245358,
-0.08312838524580002,
-0.1328212320804596,
0.011634385213255882,
0.03390007093548775,
-0.06494419276714325,
-0.030542809516191483,
0.008867369964718819,
0.01851803995668888,
-0.0... | 0.016886 |
these special headers or errors may occur. For instance, removing all headers from the request will cause errors to occur: ```js removeAllHeaders(request.headers); assert(request.url); // Fails because the :path header has been removed ``` #### `request.httpVersion` \* Type: {string} In case of server request, the HTTP... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.07725471258163452,
0.0851176306605339,
0.030386202037334442,
0.027331385761499405,
0.03555930405855179,
-0.06823159754276276,
-0.06838476657867432,
0.011231091804802418,
0.041010163724422455,
0.04321019724011421,
-0.016199776902794838,
0.021439911797642708,
0.01798827387392521,
0.057769... | 0.044573 |
of the response headers and body have been handed off to the HTTP/2 multiplexing for transmission over the network. It does not imply that the client has received anything yet. After this event, no more events will be emitted on the response object. #### `response.addTrailers(headers)` \* `headers` {Object} This method... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.07658631354570389,
0.09049095213413239,
0.01636469177901745,
0.03604678064584732,
-0.07342638820409775,
-0.0782475471496582,
-0.00011299041943857446,
0.030210934579372406,
0.005487230606377125,
0.0029202161822468042,
-0.06885433942079544,
-0.0087966900318861,
0.056988589465618134,
0.009... | 0.032282 |
others are not defined and \_will not work\_. ```js response.setHeader('Foo', 'bar'); response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); const headers = response.getHeaders(); // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } ``` #### `response.hasHeader(name)` \* `name` {string} \* Returns: {b... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.10822892189025879,
0.08833302557468414,
0.02244855836033821,
0.0006406234460882843,
-0.002984271151944995,
-0.04056147113442421,
0.07904529571533203,
0.05034014582633972,
0.006496051792055368,
-0.035319432616233826,
-0.04278925061225891,
-0.04909690096974373,
0.007661613170057535,
0.015... | 0.01855 |
```js response.statusCode = 404; ``` After response header was sent to the client, this property indicates the status code which was sent out. #### `response.statusMessage` \* Type: {string} Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns an empty string. #### `response.stream` \* Type: {Http2S... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.055352289229631424,
0.0725262314081192,
0.04207507148385048,
0.03194984421133995,
-0.010411090217530727,
-0.10050645470619202,
-0.07969553023576736,
0.015745261684060097,
0.03698377683758736,
0.0003843498125206679,
-0.03700428828597069,
0.05534523352980614,
-0.04016272351145744,
0.03271... | 0.029242 |
of bytes in a given encoding. On outbound messages, Node.js does not check if Content-Length and the length of the body being transmitted are equal or not. However, when receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. This method may be ca... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.021137749776244164,
0.07310450077056885,
0.06336551904678345,
0.04878523200750351,
0.04482189565896988,
-0.1044631153345108,
-0.0395178347826004,
0.06139860302209854,
0.0770406723022461,
-0.027160674333572388,
-0.06595473736524582,
0.03692570701241493,
0.022357024252414703,
-0.022367386... | 0.032629 |
`Http2Session`. \* `type` {string} Either `'server'` or `'client'` to identify the type of `Http2Session`. ## Note on `:authority` and `host` HTTP/2 requires requests to have either the `:authority` pseudo-header or the `host` header. Prefer `:authority` when constructing an HTTP/2 request directly, and `host` when con... | https://github.com/nodejs/node/blob/main//doc/api/http2.md | main | nodejs | [
-0.05925843492150307,
0.06142953038215637,
0.004521187394857407,
-0.019218267872929573,
-0.0546908862888813,
-0.10679490864276886,
-0.07272809743881226,
-0.05017707869410515,
0.027916813269257545,
-0.016539685428142548,
-0.01653333194553852,
-0.0723867267370224,
0.004265814553946257,
0.069... | -0.056716 |
# Inspector > Stability: 2 - Stable The `node:inspector` module provides an API for interacting with the V8 inspector. It can be accessed using: ```mjs import \* as inspector from 'node:inspector/promises'; ``` ```cjs const inspector = require('node:inspector/promises'); ``` or ```mjs import \* as inspector from 'node:... | https://github.com/nodejs/node/blob/main//doc/api/inspector.md | main | nodejs | [
-0.07545801252126694,
0.0744994580745697,
0.0031651011668145657,
0.0945446640253067,
0.03218141198158264,
-0.03473132848739624,
-0.0407848060131073,
0.07156937569379807,
0.016785917803645134,
-0.0027341824024915695,
-0.08014799654483795,
0.004744864068925381,
-0.011524456553161144,
-0.0359... | 0.120868 |
Heap profiler Here's an example showing how to use the [Heap Profiler][]: ```mjs import { Session } from 'node:inspector/promises'; import fs from 'node:fs'; const session = new Session(); const fd = fs.openSync('profile.heapsnapshot', 'w'); session.connect(); session.on('HeapProfiler.addHeapSnapshotChunk', (m) => { fs... | https://github.com/nodejs/node/blob/main//doc/api/inspector.md | main | nodejs | [
-0.03694363310933113,
0.10639353841543198,
-0.09413424879312515,
0.06534653902053833,
0.01802961342036724,
-0.062234167009592056,
-0.004650276154279709,
0.1296946406364441,
0.0034400303848087788,
-0.010336137376725674,
-0.0618625171482563,
-0.028212035074830055,
-0.003130135126411915,
0.01... | 0.110373 |
}) => { // Write profile to disk, upload, etc. if (!err) { fs.writeFileSync('./profile.cpuprofile', JSON.stringify(profile)); } }); }); }); ``` ##### Heap profiler Here's an example showing how to use the [Heap Profiler][]: ```js const inspector = require('node:inspector'); const fs = require('node:fs'); const session ... | https://github.com/nodejs/node/blob/main//doc/api/inspector.md | main | nodejs | [
-0.024382082745432854,
0.08362389355897903,
-0.12502779066562653,
0.053336579352617264,
0.03474847599864006,
-0.0748770534992218,
-0.00866182241588831,
0.16626174747943878,
-0.026390504091978073,
-0.006568955723196268,
-0.035240817815065384,
-0.02061671018600464,
0.013798737898468971,
-0.0... | 0.086405 |
HTTP response is available. ### `inspector.Network.loadingFinished([params])` \* `params` {Object} This feature is only available with the `--experimental-network-inspection` flag enabled. Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that HTTP request has finished loading.... | https://github.com/nodejs/node/blob/main//doc/api/inspector.md | main | nodejs | [
-0.07379576563835144,
0.02791115641593933,
0.014204000122845173,
0.0592854768037796,
0.02736625261604786,
-0.05455499142408371,
-0.05889683589339256,
-0.020115433260798454,
-0.019495200365781784,
-0.003930865321308374,
-0.08078861236572266,
0.006011581979691982,
-0.0774778351187706,
-0.005... | 0.039782 |
Protocol [`Debugger` domain][] allows an `inspector.Session` to attach to a program and set breakpoints to step through the codes. However, setting breakpoints with a same-thread `inspector.Session`, which is connected by [`session.connect()`][], should be avoided as the program being attached and paused is exactly the... | https://github.com/nodejs/node/blob/main//doc/api/inspector.md | main | nodejs | [
-0.09921132028102875,
-0.027406912297010422,
-0.013815119862556458,
-0.0032797963358461857,
0.03325892239809036,
-0.04346752166748047,
-0.03672221302986145,
0.014313187450170517,
-0.022707944735884666,
-0.01276798639446497,
-0.02247721515595913,
-0.0594458132982254,
-0.09465602040290833,
-... | 0.05268 |
# OS > Stability: 2 - Stable The `node:os` module provides operating system-related utility methods and properties. It can be accessed using: ```mjs import os from 'node:os'; ``` ```cjs const os = require('node:os'); ``` ## `os.EOL` \* Type: {string} The operating system-specific end-of-line marker. \* `\n` on POSIX \*... | https://github.com/nodejs/node/blob/main//doc/api/os.md | main | nodejs | [
-0.06944876909255981,
0.034948475658893585,
-0.0744757279753685,
0.04817887023091316,
0.03129344806075096,
-0.09097681939601898,
-0.07604732364416122,
0.11268089711666107,
-0.0409562774002552,
-0.016855409368872643,
-0.02465282753109932,
-0.010734410025179386,
-0.020384853705763817,
-0.107... | 0.127645 |
uses the `$HOME` environment variable if defined. Otherwise it uses the [effective UID][EUID] to look up the user's home directory. On Windows, it uses the `USERPROFILE` environment variable if defined. Otherwise it uses the path to the profile directory of the current user. ## `os.hostname()` \* Returns: {string} Retu... | https://github.com/nodejs/node/blob/main//doc/api/os.md | main | nodejs | [
-0.022153886035084724,
0.019951285794377327,
-0.04191833734512329,
0.0685989037156105,
-0.022648876532912254,
-0.10935431718826294,
0.04525003582239151,
0.11779043078422546,
0.017663458362221718,
-0.03663129359483719,
-0.07386639714241028,
0.022537169978022575,
-0.01087418757379055,
-0.033... | 0.115305 |
`-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range mapping may cause the return value to be slightly different ... | https://github.com/nodejs/node/blob/main//doc/api/os.md | main | nodejs | [
-0.04009396582841873,
0.02018028497695923,
-0.05614427104592323,
0.002351585542783141,
0.028904719278216362,
-0.1243855431675911,
0.018147936090826988,
0.1172775849699974,
0.04737216979265213,
0.03970983624458313,
0.06718048453330994,
0.007063900586217642,
-0.016642723232507706,
0.04711946... | 0.045253 |
illegal, malformed, unknown, or privileged instruction. | | `SIGTRAP` | Sent to a process when an exception has occurred. | | `SIGABRT` | Sent to a process to request that it abort. | | `SIGIOT` | Synonym for `SIGABRT` | | `SIGBUS` | Sent to a process to notify that it has caused a bus error. | | `SIGFPE` | Sent to a p... | https://github.com/nodejs/node/blob/main//doc/api/os.md | main | nodejs | [
-0.031091224402189255,
-0.0025990097783505917,
0.009514248929917812,
-0.029819246381521225,
-0.02957586757838726,
-0.0910307988524437,
0.0804525688290596,
0.12214506417512894,
0.07173173129558563,
-0.013947970233857632,
0.03523105010390282,
-0.031761959195137024,
-0.00944618321955204,
-0.0... | 0.278651 |
available and to try the operation again later. | | `EALREADY` | Indicates that the socket already has a pending connection in progress. | | `EBADF` | Indicates that a file descriptor is not valid. | | `EBADMSG` | Indicates an invalid data message. | | `EBUSY` | Indicates that a device or resource is busy. | | `ECANCEL... | https://github.com/nodejs/node/blob/main//doc/api/os.md | main | nodejs | [
-0.03864537551999092,
0.021541927009820938,
-0.024918900802731514,
-0.024302083998918533,
0.03678833320736885,
-0.04017334431409836,
-0.011898941360414028,
0.06848274916410446,
-0.005148033145815134,
-0.007871756330132484,
0.09032177180051804,
-0.04595666006207466,
0.0028787555638700724,
-... | 0.164476 |
no stream resources available. | | `ENOSTR` | Indicates that a given resource is not a stream. | | `ENOSYS` | Indicates that a function has not been implemented. | | `ENOTCONN` | Indicates that the socket is not connected. | | `ENOTDIR` | Indicates that the path is not a directory. | | `ENOTEMPTY` | Indicates that the ... | https://github.com/nodejs/node/blob/main//doc/api/os.md | main | nodejs | [
-0.022975552827119827,
-0.019924702122807503,
-0.08686262369155884,
-0.04931429401040077,
0.03965503349900246,
-0.07211847603321075,
0.00856994092464447,
0.06991676241159439,
-0.021769434213638306,
0.00557927880436182,
0.08794321864843369,
-0.029990578070282936,
-0.00902879424393177,
-0.05... | 0.240742 |
| Indicates that the network address is already in use. | | `WSAEADDRNOTAVAIL` | Indicates that the network address is not available. | | `WSAENETDOWN` | Indicates that the network is down. | | `WSAENETUNREACH` | Indicates that the network is unreachable. | | `WSAENETRESET` | Indicates that the network connection has b... | https://github.com/nodejs/node/blob/main//doc/api/os.md | main | nodejs | [
-0.026838045567274094,
-0.021602991968393326,
-0.08626232296228409,
0.02059750445187092,
0.006497100926935673,
0.010377111844718456,
-0.0004563596157822758,
0.001214147312566638,
0.010473402217030525,
-0.020810022950172424,
0.08738818019628525,
0.006481061689555645,
-0.018481485545635223,
... | 0.069546 |
own symbols in preference to symbols from previously loaded libraries. | ### Priority constants The following process scheduling constants are exported by `os.constants.priority`. | Constant | Description | | --- | --- | | `PRIORITY_LOW` | The lowest process scheduling priority. This corresponds to `IDLE_PRIORITY_CLASS... | https://github.com/nodejs/node/blob/main//doc/api/os.md | main | nodejs | [
-0.04196013882756233,
0.007208376657217741,
-0.03087007999420166,
0.014578118920326233,
0.0017766961827874184,
-0.050104450434446335,
-0.013233030214905739,
0.06568776816129684,
-0.0367121621966362,
-0.02790777198970318,
0.041874613612890244,
0.03302967548370361,
-0.025579115375876427,
0.0... | 0.092942 |
# SQLite > Stability: 1.1 - Active development. The `node:sqlite` module facilitates working with SQLite databases. To access it: ```mjs import sqlite from 'node:sqlite'; ``` ```cjs const sqlite = require('node:sqlite'); ``` This module is only available under the `node:` scheme. The following example shows the basic u... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.0019124503014609218,
-0.025738809257745743,
-0.07063732296228409,
0.08803065866231918,
-0.038978591561317444,
-0.04132763296365738,
0.000793804822023958,
0.11040512472391129,
-0.04973659664392471,
0.0159646887332201,
-0.006878864020109177,
0.021800849586725235,
0.049289118498563766,
-0.... | 0.038464 |
SQLite will wait for a database lock to be released before returning an error. \*\*Default:\*\* `0`. \* `readBigInts` {boolean} If `true`, integer fields are read as JavaScript `BigInt` values. If `false`, integer fields are read as JavaScript numbers. \*\*Default:\*\* `false`. \* `returnArrays` {boolean} If `true`, qu... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.03056951053440571,
-0.03431385010480881,
-0.05536261573433876,
0.079672671854496,
-0.0749335065484047,
-0.011914178729057312,
0.07745084166526794,
-0.03476012870669365,
-0.031795382499694824,
0.03767562285065651,
0.011145919561386108,
-0.019192596897482872,
0.014777184464037418,
-0.0860... | 0.051106 |
is thrown if the database is not open. This method is a wrapper around [`sqlite3\_close\_v2()`][]. ### `database.loadExtension(path)` \* `path` {string} The path to the shared library to load. Loads a shared library into the database connection. This method is a wrapper around [`sqlite3\_load\_extension()`][]. It is re... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
0.0038141135592013597,
-0.061592910438776016,
-0.14136964082717896,
0.026780463755130768,
0.038430292159318924,
-0.031596165150403976,
0.051577430218458176,
-0.018697062507271767,
-0.09713715314865112,
-0.02391515113413334,
0.02316810004413128,
-0.0030354156624525785,
0.0504758283495903,
-... | 0.025716 |
operation. \* `SQLITE\_DENY` - Deny the operation (causes an error). \* `SQLITE\_IGNORE` - Ignore the operation (silently skip). ```cjs const { DatabaseSync, constants } = require('node:sqlite'); const db = new DatabaseSync(':memory:'); // Set up an authorizer that denies all table creation db.setAuthorizer((actionCode... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.03249634429812431,
0.05463976413011551,
-0.04622252658009529,
0.06539177894592285,
-0.017131883651018143,
-0.07024458050727844,
0.05140379071235657,
0.031975261867046356,
-0.03426150977611542,
0.039206378161907196,
0.017052922397851944,
-0.048376839607954025,
0.047790851444005966,
-0.05... | -0.018983 |
> ```js > // This a safe example of binding a parameter to a tagged statement. > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`; > > // This is an \*unsafe\* example of an untagged template string. > // `id` is interpolated into the query text as a string. > // This can lead to SQL injection and data corruption. >... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.022394772619009018,
0.025984570384025574,
-0.051052700728178024,
0.0453273169696331,
-0.018373684957623482,
-0.026688730344176292,
0.07359281182289124,
0.04180581867694855,
-0.00007463490328518674,
-0.0660121962428093,
0.009594862349331379,
0.040304429829120636,
0.08765939623117447,
-0.... | 0.033496 |
a wrapper around [`sqlite3session\_create()`][] and [`sqlite3session\_attach()`][]. ### `database.applyChangeset(changeset[, options])` \* `changeset` {Uint8Array} A binary changeset or patchset. \* `options` {Object} The configuration options for how the changes will be applied. \* `filter` {Function} Skip changes tha... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.039970915764570236,
-0.01008595060557127,
-0.03319171071052551,
-0.0038633784279227257,
-0.03792829066514969,
-0.051763322204351425,
0.09160365164279938,
-0.029655050486326218,
-0.040653761476278305,
0.050817880779504776,
0.032724104821681976,
-0.07140123844146729,
-0.009838932193815708,
... | 0.089903 |
Closes the session. If the session is already closed, does nothing. ## Class: `StatementSync` This class represents a single [prepared statement][]. This class cannot be instantiated via its constructor. Instead, instances are created via the `database.prepare()` method. All APIs exposed by this class execute synchrono... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.028547154739499092,
0.018828896805644035,
-0.0851740688085556,
0.11510530114173889,
-0.10299402475357056,
-0.022850461304187775,
0.07428120076656342,
0.022194167599081993,
-0.012182718142867088,
0.01958400197327137,
-0.029995199292898178,
-0.0073176040314137936,
0.06295865774154663,
-0.... | 0.084152 |
any results, this method returns `undefined`. The prepared statement [parameters are bound][] using the values in `namedParameters` and `anonymousParameters`. ### `statement.iterate([namedParameters][, ...anonymousParameters])` \* `namedParameters` {Object} An optional object used to bind named parameters. The keys of ... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.016823040321469307,
0.02907014824450016,
-0.09811455756425858,
0.05144574120640755,
-0.11922727525234222,
-0.07106947153806686,
0.003878807881847024,
0.04171907156705856,
-0.04553864896297455,
-0.0440797433257103,
0.027840813621878624,
-0.044333316385746,
0.0354759581387043,
-0.11061637... | 0.104503 |
cases, this method can be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no impact on database write operations where numbers and `BigInt`s are both supported at all times. ### `statement.sourceSQL` \* Type: {string} The source SQL used to create this prepared statement. The source SQL text of ... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
0.015429427847266197,
0.04542509466409683,
-0.06581849604845047,
0.07421404868364334,
-0.039420273154973984,
-0.05576293542981148,
0.08486148715019226,
0.06694275885820389,
-0.03035668097436428,
0.00631808303296566,
-0.046225253492593765,
0.050343092530965805,
0.05357811599969864,
-0.09013... | 0.089072 |
types and SQLite's [data types][]. Because JavaScript supports more data types than SQLite, only a subset of JavaScript types are supported. Attempting to write an unsupported data type to SQLite will result in an exception. | SQLite | JavaScript | | --------- | -------------------------- | | `NULL` | {null} | | `INTEG... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.06992650032043457,
-0.07683559507131577,
-0.002104907063767314,
0.053792160004377365,
-0.015402266755700111,
0.0005475017242133617,
0.05038776993751526,
0.06549470126628876,
-0.07232136279344559,
-0.03597605228424072,
-0.05356431379914284,
0.016202785074710846,
0.0502476692199707,
-0.07... | -0.01412 |
conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database. | | `SQLITE_CHANGESET_CONFLICT` | This constant is passed to the conflict handler while processing an INSERT change if the operation would result in dupl... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.050636425614356995,
-0.014323849231004715,
0.006252311170101166,
-0.0029784187208861113,
0.012938302010297775,
-0.025083905085921288,
0.034633323550224304,
-0.024526264518499374,
0.021543867886066437,
0.04203406348824501,
0.04160754010081291,
-0.0021252355072647333,
0.017378633841872215,
... | 0.088907 |
Detach a database | | `SQLITE_ALTER_TABLE` | Alter a table | | `SQLITE_REINDEX` | Reindex | | `SQLITE_ANALYZE` | Analyze the database | | `SQLITE_CREATE_VTABLE` | Create a virtual table | | `SQLITE_DROP_VTABLE` | Drop a virtual table | | `SQLITE_FUNCTION` | Use a function | | `SQLITE_SAVEPOINT` | Create, release, or ro... | https://github.com/nodejs/node/blob/main//doc/api/sqlite.md | main | nodejs | [
-0.04076353833079338,
-0.024604573845863342,
-0.02727835439145565,
0.004772953689098358,
-0.031373120844364166,
-0.049127139151096344,
0.03168819099664688,
-0.023652199655771255,
-0.061321940273046494,
0.0966162458062172,
0.08335219323635101,
-0.01931982859969139,
-0.0202992781996727,
-0.1... | 0.102918 |
# Stream > Stability: 2 - Stable A stream is an abstract interface for working with streaming data in Node.js. The `node:stream` module provides an API for implementing the stream interface. There are many stream objects provided by Node.js. For instance, a [request to an HTTP server][http-incoming-message] and [`proce... | https://github.com/nodejs/node/blob/main//doc/api/stream.md | main | nodejs | [
-0.04832777753472328,
-0.02461600862443447,
0.01245670486241579,
0.027663903310894966,
0.06049765273928642,
-0.02142409048974514,
-0.0185977965593338,
0.050491828471422195,
0.039725787937641144,
-0.042334698140621185,
-0.0737425908446312,
0.05312336981296539,
-0.08163343369960785,
0.012114... | 0.138117 |
signal }) { source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. for await (const chunk of source) { yield await processChunk(chunk, { signal }); } }, fs.createWriteStream('uppercase.txt'), ); console.log('Pipeline succeeded.'); } run().catch(console.error); ``` ```mjs import { pipeline } from 'node:... | https://github.com/nodejs/node/blob/main//doc/api/stream.md | main | nodejs | [
-0.024190671741962433,
0.02352224476635456,
0.01818167418241501,
-0.024721240624785423,
-0.07658626139163971,
-0.03280533477663994,
-0.025139017030596733,
0.12643231451511383,
0.020538287237286568,
-0.055035416036844254,
-0.05080673098564148,
-0.020890163257718086,
-0.0024402036797255278,
... | 0.04724 |
number of bytes][hwm-gotcha]. For streams operating in object mode, the `highWaterMark` specifies a total number of objects. For streams operating on (but not decoding) strings, the `highWaterMark` specifies a total number of UTF-16 code units. Data is buffered in `Readable` streams when the implementation calls [`stre... | https://github.com/nodejs/node/blob/main//doc/api/stream.md | main | nodejs | [
-0.009721480309963226,
-0.00295035052113235,
-0.04504572972655296,
-0.006387977860867977,
-0.01903548836708069,
-0.11710165441036224,
0.04680173471570015,
0.027804570272564888,
-0.010395410470664501,
-0.03790624067187309,
-0.05415889993309975,
0.04629207402467728,
-0.017115173861384392,
-0... | 0.096119 |
} }); }); server.listen(1337); // $ curl localhost:1337 -d "{}" // object // $ curl localhost:1337 -d "\"foo\"" // string // $ curl localhost:1337 -d "not json" // error: Unexpected token 'o', "not json" is not valid JSON ``` [`Writable`][] streams (such as `res` in the example) expose methods such as `write()` and `en... | https://github.com/nodejs/node/blob/main//doc/api/stream.md | main | nodejs | [
-0.03161061182618141,
0.03862990066409111,
-0.057846687734127045,
-0.03788752853870392,
-0.06035851314663887,
-0.04973224923014641,
-0.026640189811587334,
0.016435813158750534,
0.09979028254747391,
-0.02864585444331169,
-0.008799812756478786,
0.027337070554494858,
-0.03777959197759628,
0.0... | 0.15733 |
##### Event: `'finish'` The `'finish'` event is emitted after the [`stream.end()`][stream-end] method has been called, and all data has been flushed to the underlying system. ```js const writer = getWritableStreamSomehow(); for (let i = 0; i < 100; i++) { writer.write(`hello, #${i}!\n`); } writer.on('finish', () => { c... | https://github.com/nodejs/node/blob/main//doc/api/stream.md | main | nodejs | [
-0.004100474528968334,
0.002939383964985609,
0.02394012361764908,
0.028934171423316002,
0.030154773965477943,
-0.028101468458771706,
-0.00994904711842537,
0.013063862919807434,
0.07927650213241577,
-0.0014711848925799131,
-0.03744921088218689,
0.06626342982053757,
-0.11402423679828644,
-0.... | 0.128252 |
const myStream = new Writable(); console.log(myStream.destroyed); // false myStream.destroy(); console.log(myStream.destroyed); // true ``` ##### `writable.end([chunk[, encoding]][, callback])` \* `chunk` {string|Buffer|TypedArray|DataView|any} Optional data to write. For streams not operating in object mode, `chunk` m... | https://github.com/nodejs/node/blob/main//doc/api/stream.md | main | nodejs | [
-0.010923793539404869,
-0.005884394980967045,
0.007172592915594578,
0.041352663189172745,
-0.015510724857449532,
-0.04911837726831436,
-0.012078933417797089,
0.024655308574438095,
0.024104265496134758,
-0.046101413667201996,
-0.09989546239376068,
0.09373729676008224,
-0.11610795557498932,
... | 0.0818 |
than `null`. \* `encoding` {string|null} The encoding, if `chunk` is a string. \*\*Default:\*\* `'utf8'` \* `callback` {Function} Callback for when this chunk of data is flushed. \* Returns: {boolean} `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to wr... | https://github.com/nodejs/node/blob/main//doc/api/stream.md | main | nodejs | [
-0.07431057095527649,
0.026633616536855698,
-0.035783346742391586,
0.07837475091218948,
-0.0695832148194313,
-0.09784012287855148,
-0.0116482675075531,
0.030281325802206993,
0.01656041108071804,
-0.04055172950029373,
-0.052515722811222076,
0.031001197174191475,
-0.010043509304523468,
-0.05... | 0.08789 |
using events via the [`EventEmitter`][] interface. \* In paused mode, the [`stream.read()`][stream-read] method must be called explicitly to read chunks of data from the stream. All [`Readable`][] streams begin in paused mode but can be switched to flowing mode in one of the following ways: \* Adding a [`'data'`][] eve... | https://github.com/nodejs/node/blob/main//doc/api/stream.md | main | nodejs | [
-0.014044057577848434,
-0.025417018681764603,
-0.044573940336704254,
0.011224008165299892,
-0.005502968095242977,
-0.03716408461332321,
-0.004655390977859497,
0.02759215421974659,
-0.04015040770173073,
-0.014685924164950848,
-0.04952896758913994,
0.06227264553308487,
-0.08279132097959518,
... | 0.065025 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.