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 |
|---|---|---|---|---|---|
for the completion. \* The substring that was used for the matching. For instance: `[[substr1, substr2, ...], originalsubstring]`. ```js function completer(line) { const completions = '.help .error .exit .quit .q'.split(' '); const hits = completions.filter((c) => c.startsWith(line)); // Show all completions if none fo... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
-0.16070079803466797,
0.053169410675764084,
0.022314101457595825,
0.03278307989239693,
-0.026082366704940796,
-0.011578976176679134,
-0.021594006568193436,
0.009953639470040798,
0.03826913610100746,
-0.09128917008638382,
-0.0926160216331482,
0.04860898479819298,
-0.03359290584921837,
0.006... | 0.071734 |
autocompletion. \* `terminal` {boolean} `true` if the `input` and `output` streams should be treated like a TTY, and have ANSI/VT100 escape codes written to it. \*\*Default:\*\* checking `isTTY` on the `output` stream upon instantiation. \* `history` {string\[]} Initial list of history lines. This option makes sense on... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
-0.007308863569051027,
0.03674588352441788,
-0.058620844036340714,
-0.010869873687624931,
-0.05422446131706238,
0.04521646723151207,
0.009625320322811604,
-0.017891742289066315,
-0.0056306226179003716,
0.02292170748114586,
-0.010018405504524708,
-0.0025356910191476345,
0.023912502452731133,
... | 0.052293 |
line]; } ``` The `completer` function can be called asynchronously if it accepts two arguments: ```js function completer(linePartial, callback) { callback(null, [['123'], linePartial]); } ``` ### `readline.cursorTo(stream, x[, y][, callback])` \* `stream` {stream.Writable} \* `x` {number} \* `y` {number} \* `callback` ... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
-0.10780798643827438,
-0.058764390647411346,
-0.01866224780678749,
-0.012883740477263927,
-0.06653933227062225,
-0.07762181013822556,
0.019930317997932434,
0.017869241535663605,
0.016791626811027527,
-0.05550094321370125,
-0.034795477986335754,
0.09628476202487946,
-0.05997370183467865,
-0... | 0.065803 |
single line break. for await (const line of rl) { // Each line in input.txt will be successively available here as `line`. console.log(`Line from file: ${line}`); } } processLineByLine(); ``` Alternatively, one could use the [`'line'`][] event: ```mjs import { createReadStream } from 'node:fs'; import { createInterface... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
-0.08875766396522522,
0.02630920708179474,
0.00039617816219106317,
0.040564823895692825,
0.030868245288729668,
0.032348792999982834,
-0.02711034007370472,
0.08935753256082535,
0.008867500349879265,
0.018284469842910767,
-0.0760144367814064,
0.021945586428046227,
0.008394675329327583,
-0.04... | 0.036918 |
| `Ctrl`+`Backspace` Doesn't work on Linux, Mac and Windows | | `Ctrl`+`Delete` | Delete forward to a word boundary | Doesn't work on Mac | | `Ctrl`+`Left arrow` or `Meta`+`B` | Word left | `Ctrl`+`Left arrow` Doesn't work on Mac | | `Ctrl`+`Right arrow` or `Meta`+`F` | Word right | `Ctrl`+`Right arrow` Doesn't work on... | https://github.com/nodejs/node/blob/main/doc/api/readline.md | main | nodejs | [
0.024695947766304016,
-0.11654406040906906,
-0.0007116099004633725,
0.008721989579498768,
-0.02342461608350277,
0.012177948839962482,
0.02533237263560295,
-0.028534168377518654,
0.032228946685791016,
0.052330132573843,
0.09176386147737503,
0.03288589417934418,
0.042331576347351074,
-0.0023... | 0.061828 |
# Punycode > Stability: 0 - Deprecated \*\*The version of the punycode module bundled in Node.js is being deprecated.\*\* In a future major version of Node.js this module will be removed. Users currently depending on the `punycode` module should switch to using the userland-provided [Punycode.js][] module instead. For ... | https://github.com/nodejs/node/blob/main/doc/api/punycode.md | main | nodejs | [
-0.041146501898765564,
-0.017116617411375046,
0.0026556523516774178,
-0.02385886199772358,
-0.01238738652318716,
-0.01806218922138214,
-0.007180941756814718,
0.01182885654270649,
0.02545512095093727,
-0.0063492232002317905,
-0.008889845572412014,
0.03887016698718071,
-0.020917555317282677,
... | 0.114463 |
# Performance measurement APIs > Stability: 2 - Stable This module provides an implementation of a subset of the W3C [Web Performance APIs][] as well as additional APIs for Node.js-specific performance measurements. Node.js supports the following [Web Performance APIs][]: \* [High Resolution Time][] \* [Performance Tim... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
0.0007594400085508823,
0.02527609094977379,
-0.0921873152256012,
0.0871971920132637,
0.004179504234343767,
-0.059309616684913635,
-0.01553946454077959,
0.015323817729949951,
0.036082666367292404,
-0.01572529412806034,
-0.09256549179553986,
-0.014409113675355911,
-0.04097921773791313,
-0.04... | 0.117812 |
'fetch' \* `global` {Object} \* `cacheMode` {string} The cache mode must be an empty string ('') or 'local' \* `bodyInfo` {Object} [Fetch Response Body Info][] \* `responseStatus` {number} The response's status code \* `deliveryType` {string} The delivery type. \*\*Default:\*\* `''`. \_This property is an extension by ... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
-0.03971755504608154,
0.08303532749414444,
-0.033715616911649704,
0.08569204062223434,
-0.021206004545092583,
-0.07056355476379395,
0.039440225809812546,
-0.016797691583633423,
0.03403430059552193,
-0.015245822258293629,
-0.059658221900463104,
0.03852570056915283,
-0.025046445429325104,
-0... | 0.09411 |
Adjust resource timing buffer size with `performance.setResourceTimingBufferSize()` or clear the buffer with `performance.clearResourceTimings()` in the event listener to allow more entries to be added to the performance timeline buffer. ## Class: `PerformanceEntry` The constructor of this class is not exposed to users... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
-0.0023779720067977905,
0.03328104317188263,
-0.010945422574877739,
0.01762147806584835,
-0.0209574643522501,
-0.06607696413993835,
0.003164913272485137,
-0.023715263232588768,
0.0646204724907875,
-0.04491829872131348,
-0.09947527199983597,
0.008070879615843296,
-0.07065998762845993,
-0.06... | 0.041215 |
{Object} containing additional performance information. If `performanceEntry.name` is equal to `Http2Stream`, the `detail` will contain the following properties: \* `bytesRead` {number} The number of `DATA` frame bytes received for this `Http2Stream`. \* `bytesWritten` {number} The number of `DATA` frame bytes sent for... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
-0.02556901052594185,
0.0621253065764904,
-0.10122546553611755,
0.0008276394219137728,
0.004438664764165878,
-0.0801110491156578,
0.005173586308956146,
0.04247356578707695,
0.05655401200056076,
-0.02256837487220764,
-0.07503802329301834,
-0.02036091312766075,
0.007330228108912706,
-0.05439... | 0.117931 |
{number} The high resolution millisecond timestamp at which the Node.js event loop exited. If the event loop has not yet exited, the property has the value of -1. It can only have a value of not -1 in a handler of the [`'exit'`][] event. ### `performanceNodeTiming.loopStart` \* Type: {number} The high resolution millis... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
-0.000375744653865695,
0.04694228246808052,
-0.009595362469553947,
0.06631244719028473,
0.03362482041120529,
-0.05206907168030739,
0.052190665155649185,
0.041858937591314316,
0.0655224621295929,
-0.004568454809486866,
-0.05352829396724701,
-0.00034927428350783885,
-0.02214229665696621,
-0.... | 0.076 |
whichever comes first. ### `performanceResourceTiming.transferSize` \* Type: {number} A number representing the size (in octets) of the fetched resource. The size includes the response header fields plus the response payload body. ### `performanceResourceTiming.encodedBodySize` \* Type: {number} A number representing t... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
-0.057179924100637436,
0.08956260234117508,
-0.07202589511871338,
0.05355572700500488,
-0.013585888780653477,
-0.05535243824124336,
0.03855061158537865,
0.00434973556548357,
0.01490104105323553,
-0.03560102730989456,
-0.03612629324197769,
0.049357760697603226,
-0.043413370847702026,
-0.015... | 0.089864 |
'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 |
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 `PerformanceObserver` must... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
0.04677557945251465,
0.04603874310851097,
-0.04876428842544556,
0.03243127465248108,
0.00540879275649786,
-0.0034259415697306395,
0.029457107186317444,
0.05111229047179222,
0.033190131187438965,
-0.028339244425296783,
-0.05437369644641876,
-0.051526203751564026,
-0.0187127273529768,
-0.032... | 0.146796 |
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 amount in the histogram. ## Exam... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
0.01424526795744896,
0.08194495737552643,
-0.08602561056613922,
0.06019420921802521,
-0.06459187716245651,
-0.02127045765519142,
0.018608633428812027,
0.03183083236217499,
0.030055463314056396,
-0.09215257316827774,
-0.08739452809095383,
0.007395225577056408,
0.02361871674656868,
-0.093641... | 0.079223 |
const PORT = 8080; createServer((socket) => { socket.destroy(); }).listen(PORT, () => { connect(PORT); }); ``` ```cjs const { PerformanceObserver } = require('node:perf\_hooks'); const net = require('node:net'); const obs = new PerformanceObserver((items) => { items.getEntries().forEach((item) => { console.log(item); }... | https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md | main | nodejs | [
-0.06542026251554489,
0.06669264286756516,
-0.050699520856142044,
0.044651225209236145,
-0.07232941687107086,
-0.08952152729034424,
0.004596802406013012,
-0.021001148968935013,
0.09129165858030319,
0.01717841811478138,
-0.05246438458561897,
0.008119823411107063,
-0.04915931820869446,
-0.03... | 0.074764 |
# 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.060847628861665726,
0.10178353637456894,
-0.01213561836630106,
0.06568054109811783,
0.029046490788459778,
-0.047900617122650146,
-0.009820213541388512,
0.005362657830119133,
0.023854004219174385,
-0.04039503633975983,
0.0006658531492576003,
-0.04323601350188255,
-0.0678858831524849,
-0.... | 0.040364 |
# 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 |
'./library.wasm'; console.log(M); ``` executed under: ```bash node index.mjs ``` would provide the exports interface for the instantiation of `library.wasm`. ### Reserved Wasm Namespaces When importing WebAssembly module instances, they cannot use import module names or import/export names that start with reserved pref... | https://github.com/nodejs/node/blob/main/doc/api/esm.md | main | nodejs | [
-0.046712055802345276,
-0.04120570048689842,
-0.026634519919753075,
0.09946772456169128,
0.09311910718679428,
-0.016693467274308205,
-0.006863707210868597,
0.06283657997846603,
-0.05513046681880951,
-0.03272765129804611,
0.012436877004802227,
-0.019253486767411232,
0.02504081092774868,
0.0... | 0.085244 |
of these top-level routines unless stated otherwise. \_defaultConditions\_ is the conditional environment name array, `["node", "import"]`. The resolver can throw the following errors: \* \_Invalid Module Specifier\_: Module specifier is an invalid URL, package name or package subpath specifier. \* \_Invalid Package Co... | https://github.com/nodejs/node/blob/main/doc/api/esm.md | main | nodejs | [
-0.10808532685041428,
-0.039216652512550354,
0.04363320395350456,
-0.03431238234043121,
0.05008292570710182,
-0.05589456111192703,
-0.037503212690353394,
0.06844046711921692,
-0.07403896749019623,
0.011494188569486141,
0.00813684705644846,
-0.0352170504629612,
0.026496946811676025,
0.00711... | 0.120626 |
be the result of > \*\*PACKAGE\\_SELF\\_RESOLVE\*\*(\_packageName\_, \_packageSubpath\_, \_parentURL\_). > 9. If \_selfUrl\_ is not \*\*undefined\*\*, return \_selfUrl\_. > 10. While \_parentURL\_ is not the file system root, > 1. Let \_packageURL\_ be the URL resolution of \_"node\\_modules/"\_ > concatenated with \_p... | https://github.com/nodejs/node/blob/main/doc/api/esm.md | main | nodejs | [
-0.06407101452350616,
0.00908616092056036,
0.024790648370981216,
-0.030607465654611588,
0.0027096860576421022,
-0.020580915734171867,
0.02460704930126667,
0.09825004637241364,
0.007057714741677046,
-0.04592328891158104,
0.09919816255569458,
-0.007880214601755142,
-0.020385660231113434,
0.0... | 0.028677 |
ends in \_"/"\_, then > 1. Throw an \_Invalid Module Specifier\_ error. > 2. If \_matchKey\_ is a key of \_matchObj\_ and does not contain \_"\\*"\_, then > 1. Let \_target\_ be the value of \_matchObj\_\[\_matchKey\_]. > 2. Return the result of \*\*PACKAGE\\_TARGET\\_RESOLVE\*\*(\_packageURL\_, > \_target\_, \*\*null\... | https://github.com/nodejs/node/blob/main/doc/api/esm.md | main | nodejs | [
-0.035038575530052185,
0.03137461841106415,
0.03082175925374031,
-0.0326426662504673,
-0.03149968385696411,
0.011037868447601795,
0.11483148485422134,
0.04435620456933975,
-0.07297966629266739,
0.02013488858938217,
0.017436450347304344,
-0.09043899178504944,
0.0616895817220211,
-0.02874984... | 0.098779 |
in ECMA-262 > [6.1.7 Array Index][], throw an \_Invalid Package Configuration\_ error. > 2. For each property \_p\_ of \_target\_, in object insertion order as, > 1. If \_p\_ equals \_"default"\_ or \_conditions\_ contains an entry for \_p\_, > then > 1. Let \_targetValue\_ be the value of the \_p\_ property in \_targe... | https://github.com/nodejs/node/blob/main/doc/api/esm.md | main | nodejs | [
-0.01578868366777897,
0.06991463154554367,
0.005275009199976921,
-0.03365359455347061,
-0.029482318088412285,
-0.015966547653079033,
0.029391339048743248,
0.010731488466262817,
-0.05112675949931145,
-0.006391625851392746,
0.03569977357983589,
-0.11599069088697433,
0.016546953469514847,
-0.... | 0.082629 |
module. > 2. If the parse is successful, then > 1. If \_source\_ contains top-level `await`, static `import` or `export` > statements, or `import.meta`, return \*\*true\*\*. > 2. If \_source\_ contains a top-level lexical declaration (`const`, `let`, > or `class`) of any of the CommonJS wrapper variables (`require`, > ... | https://github.com/nodejs/node/blob/main/doc/api/esm.md | main | nodejs | [
-0.04213663190603256,
0.013123281300067902,
0.037403494119644165,
0.01490814983844757,
0.06916250288486481,
-0.03868205100297928,
-0.014127080328762531,
0.05986396223306656,
-0.04422365874052048,
-0.0001814699498936534,
0.0035573041532188654,
-0.05731796845793724,
-0.0462191104888916,
0.01... | 0.125715 |
# 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. The [`"exports"`][] field,... | https://github.com/nodejs/node/blob/main/doc/api/packages.md | main | nodejs | [
-0.09423021972179413,
0.027988646179437637,
-0.05149076133966446,
-0.019895991310477257,
0.08608099818229675,
0.0008953108917921782,
0.028155090287327766,
0.07913433015346527,
0.040362149477005005,
-0.030332867056131363,
-0.023603640496730804,
0.08779225498437881,
-0.02762027271091938,
-0.... | 0.111148 |
[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.04191664606332779,
-0.027910759672522545,
0.035458363592624664,
-0.04472869262099266,
0.11784511804580688,
0.008183629252016544,
-0.04413994774222374,
0.04456878826022148,
-0.043621886521577835,
0.018914712592959404,
-0.009250677190721035,
0.023395905271172523,
-0.041765253990888596,
0.... | 0.129885 |
# 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 |
to `http2.constants.NGHTTP2\_SESSION\_CLIENT`. ```mjs import { 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', (header... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.050621259957551956,
0.12310543656349182,
0.04483600705862045,
-0.020711401477456093,
-0.04552162066102028,
-0.05375714227557182,
-0.07390347868204117,
0.06383241713047028,
0.018735917285084724,
0.013506711460649967,
-0.04609642177820206,
-0.054289478808641434,
-0.01846514455974102,
-0.0... | -0.018109 |
`undefined`, the stream is not yet ready for use. ##### Destruction All [`Http2Stream`][] instances are destroyed when one of the following happens: \* Both sides send `END\_STREAM` (a clean exchange). \* The peer sends an `RST\_STREAM` frame. \* `http2stream.close()`, `http2stream.destroy()`, or `http2session.destroy(... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.04931436851620674,
0.005009512882679701,
0.0051852320320904255,
-0.01007404737174511,
0.07038680464029312,
-0.09584685415029526,
-0.0405707061290741,
0.013390357606112957,
0.06869688630104065,
0.040072906762361526,
-0.02847333997488022,
0.06040789559483528,
-0.05726153776049614,
0.03484... | 0.094471 |
to send trailing headers. When initiating a request or response, the `waitForTrailers` option must be set for this event to be emitted. #### `http2stream.aborted` \* Type: {boolean} `true` if the `Http2Stream` was closed while the writable side was still open. When set, the `'aborted'` event was emitted. #### `http2str... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.007941796444356441,
0.015282894484698772,
-0.03539018705487251,
0.034603461623191833,
0.02251703105866909,
-0.029632385820150375,
-0.051236577332019806,
0.06825370341539383,
0.08375143259763718,
0.010629539377987385,
-0.06261839717626572,
0.013026254251599312,
-0.052412696182727814,
-0.... | 0.018535 |
\* `sumDependencyWeight` {number} Legacy property, always set to `0`. \* `weight` {number} 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 ... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.05322049558162689,
0.06939075887203217,
-0.0012990734539926052,
0.05455389991402626,
0.028483498841524124,
-0.04776141792535782,
-0.025402691215276718,
0.04235287383198738,
0.0753675103187561,
-0.009938779287040234,
-0.030298128724098206,
-0.01228609774261713,
-0.039372727274894714,
0.0... | 0.003554 |
Also, until the data is read, it will consume memory that can eventually lead to a "process out of memory" error. ```cjs const http2 = require('node:http2'); const client = http2.connect('https://localhost'); const req = client.request({ ':path': '/' }); req.on('response', (headers, flags) => { console.log(headers[':st... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.021569455042481422,
0.0934075117111206,
0.008921589702367783,
0.037531718611717224,
-0.017510980367660522,
-0.08581265062093735,
-0.09367328882217407,
0.08240580558776855,
0.04560334235429764,
-0.002062699059024453,
-0.06306231766939163,
0.07430129498243332,
-0.05345940589904785,
-0.049... | 0.017956 |
The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. When `options.waitForTrailers` is set, the `Http2Stream` will not automatically close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.020015845075249672,
0.06721010059118271,
-0.026109857484698296,
-0.003344786586239934,
0.042545028030872345,
-0.0497906319797039,
-0.04271417856216431,
0.05498780682682991,
0.054812293499708176,
-0.0032497451175004244,
-0.011613256298005581,
-0.009125135838985443,
-0.03650465980172157,
... | -0.016814 |
import { openSync, fstatSync, closeSync } from 'node:fs'; const server = createServer(); server.on('stream', (stream) => { const fd = openSync('/some/file', 'r'); const stat = fstatSync(fd); const headers = { 'content-length': stat.size, 'last-modified': stat.mtime.toUTCString(), 'content-type': 'text/plain; charset=ut... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.07306617498397827,
0.09183260053396225,
-0.06741619110107422,
0.035575687885284424,
0.03340078890323639,
-0.01938069611787796,
-0.0792066678404808,
0.07407015562057495,
0.08775313943624496,
-0.008548274636268616,
-0.03990152105689049,
-0.014154578559100628,
-0.028458619490265846,
-0.038... | 0.046044 |
} stream.respondWithFile('/some/file', { 'content-type': 'text/plain; charset=utf-8' }, { statCheck }); }); ``` ```cjs const http2 = require('node:http2'); const server = http2.createServer(); server.on('stream', (stream) => { function statCheck(stat, headers) { // Check the stat here... stream.respond({ ':status': 304... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.08991998434066772,
0.0845637172460556,
-0.022007158026099205,
0.013049019500613213,
0.038384731858968735,
-0.05076201260089874,
-0.040984492748975754,
0.07957178354263306,
0.06160378456115723,
0.008189978078007698,
-0.04258975759148598,
0.011910226196050644,
-0.046672917902469635,
0.002... | 0.059291 |
Headers Object} An object describing the headers \* `flags` {number} The associated numeric flags \* `rawHeaders` {HTTP/2 Raw Headers} An array containing the raw headers The `'stream'` event is emitted when a `'stream'` event has been emitted by an `Http2Session` associated with the server. See also [`Http2Session`'s ... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.04369299113750458,
0.08318308740854263,
-0.010355326347053051,
-0.004223086405545473,
0.04663969948887825,
-0.058701202273368835,
-0.014519130811095238,
0.03445295989513397,
0.03968789801001549,
0.028699379414319992,
-0.04858303442597389,
-0.05507051199674606,
-0.007045449689030647,
0.0... | 0.093367 |
[`'request'`][] event will not be emitted. #### Event: `'connection'` \* `socket` {stream.Duplex} This event is emitted when a new TCP stream is established, before the TLS handshake begins. `socket` is typically an object of type [`net.Socket`][]. Usually users will not want to access this event. This event can also b... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.06981641799211502,
0.05159470811486244,
-0.007866090163588524,
-0.012171686626970768,
-0.06378547847270966,
-0.07758847624063492,
0.02344183437526226,
-0.03622647002339363,
0.10052216053009033,
0.006730173714458942,
-0.048072803765535355,
0.006268690340220928,
0.010875467211008072,
0.05... | 0.057056 |
has already stopped allowing new sessions. See [`tls.Server.close()`][] for more details. #### `server.setTimeout([msecs][, callback])` \* `msecs` {number} \*\*Default:\*\* `120000` (2 minutes) \* `callback` {Function} \* Returns: {Http2SecureServer} Used to set the timeout value for http2 secure server requests, and s... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.054779425263404846,
0.0424426905810833,
-0.027791300788521767,
0.056043997406959534,
-0.03255416825413704,
-0.0806761309504509,
-0.032180797308683395,
-0.0005343220545910299,
0.13671404123306274,
0.01611233502626419,
-0.044707950204610825,
0.02412683330476284,
0.0025097329635173082,
0.0... | 0.015157 |
streams for the remote peer as if a `SETTINGS` frame had been received. Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`. \*\*Default:\*\* `100`. \* `maxSessionInvalidFrames` {integer} Sets the maximum number of invalid frames that will be tolerated before the session is closed. \*\*D... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.04440276324748993,
-0.00012232917651999742,
-0.03274371847510338,
0.00897868163883686,
0.044741202145814896,
-0.020312314853072166,
-0.01811661198735237,
-0.008183523081243038,
0.03196386992931366,
0.04419362545013428,
-0.03574833646416664,
0.020721297711133957,
0.017408475279808044,
0.... | 0.013123 |
necessary when communicating with browser clients. const server = createServer(); server.on('stream', (stream, headers) => { stream.respond({ 'content-type': 'text/html; charset=utf-8', ':status': 200, }); stream.end(' # Hello World '); }); server.listen(8000); ``` ```cjs const http2 = require('node:http2'); // Create ... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.06422147154808044,
0.027688561007380486,
-0.015034163370728493,
-0.01467064581811428,
-0.013001525774598122,
-0.09223269671201706,
-0.07261339575052261,
0.04309668391942978,
0.08593407273292542,
-0.062038544565439224,
-0.03136426582932472,
-0.005517392884939909,
-0.03502557426691055,
0.... | 0.010552 |
any more streams, continuing to open streams is therefore regarded as a sign of a misbehaving peer. \*\*Default:\*\* `100`. \* `settings` {HTTP/2 Settings Object} The initial settings to send to the remote peer upon connection. \* `streamResetBurst` {number} and `streamResetRate` {number} Sets the rate limit for the in... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
0.02319841831922531,
-0.03235599398612976,
-0.036870066076517105,
0.005230078939348459,
-0.01650579646229744,
-0.023524876683950424,
-0.0871567577123642,
-0.00029723739135079086,
0.033606767654418945,
0.030213613063097,
-0.032054077833890915,
0.020281491801142693,
-0.02814457006752491,
0.0... | -0.097785 |
value allowed is `1`. \*\*Default:\*\* `32`. \* `maxSessionMemory`{number} Sets the maximum memory that the `Http2Session` is permitted to use. The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte. The minimum value allowed is `1`. This is a credit based limit, existing `Http2Stream`s may c... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.0023548027966171503,
0.027433717623353004,
-0.060387901961803436,
-0.012662872672080994,
0.013735709711909294,
-0.07620418071746826,
-0.0741443932056427,
0.04852116107940674,
0.018866488710045815,
0.0286828875541687,
-0.04353068023920059,
0.008696634322404861,
0.0047231512144207954,
-0.... | 0.063539 |
has not been destroyed by that time the server will destroy it. \*\*Default:\*\* `10000`. \* `strictFieldWhitespaceValidation` {boolean} If `true`, it turns on strict leading and trailing whitespace validation for HTTP/2 header field names and values as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.05125236511230469,
0.05946021527051926,
0.0527198351919651,
0.029425861313939095,
0.014012891799211502,
-0.08899179846048355,
-0.018815970048308372,
-0.021204128861427307,
0.10729584842920303,
-0.02257750928401947,
-0.030658824369311333,
0.043843839317560196,
0.022186515852808952,
0.002... | 0.068653 |
`Object.prototype.toString()` and `Object.prototype.hasOwnProperty()` will not work. For incoming headers: \* The `:status` header is converted to `number`. \* Duplicates of `:status`, `:method`, `:authority`, `:scheme`, `:path`, `:protocol`, `age`, `authorization`, `access-control-allow-credentials`, `access-control-m... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.0686141848564148,
0.06901881098747253,
-0.048943374305963516,
-0.029476752504706383,
0.0018770296592265368,
-0.024509459733963013,
-0.03658032789826393,
0.10121557116508484,
-0.04561325162649155,
0.07436751574277878,
-0.03143658488988876,
-0.07766323536634445,
0.003768147900700569,
0.00... | 0.056652 |
maximum allowed value is 224-1. \*\*Default:\*\* `16384`. \* `maxConcurrentStreams` {number} Specifies the maximum number of concurrent streams permitted on an `Http2Session`. There is no default value which implies, at least theoretically, 232-1 streams may be open concurrently at any given time in an `Http2Session`. ... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.022328494116663933,
-0.02451775223016739,
-0.10178449749946594,
-0.06729165464639664,
-0.027922723442316055,
0.0015588502865284681,
-0.06826431304216385,
0.039153702557086945,
-0.005444978829473257,
0.011830570176243782,
-0.036493025720119476,
-0.01278185099363327,
0.020518137142062187,
... | 0.044221 |
ASCII characters: `a`-`z`, `A`-`Z`, `0`-`9`, `!`, `#`, `$`, `%`, `&`, `'`, `\*`, `+`, `-`, `.`, `^`, `\_`, `` ` `` (backtick), `|`, and `~`. Using invalid characters within an HTTP header field name will cause the stream to be closed with a protocol error being reported. Header field values are handled with more lenien... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.09510472416877747,
0.06215473264455795,
0.005336087197065353,
-0.026695631444454193,
-0.018198130652308464,
-0.06229527294635773,
0.015497150830924511,
0.056840162724256516,
0.04246781766414642,
-0.010200483724474907,
-0.017548052594065666,
-0.027984466403722763,
0.04731231927871704,
0.... | 0.036696 |
an error will be thrown. const req = client.request({ ':method': 'CONNECT', ':authority': 'localhost:8000', }); req.on('response', (headers) => { console.log(headers[http2.constants.HTTP2\_HEADER\_STATUS]); }); let data = ''; req.setEncoding('utf8'); req.on('data', (chunk) => data += chunk); req.on('end', () => { conso... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.08776822686195374,
0.098026342689991,
0.006528439931571484,
0.0028160542715340853,
-0.028808066621422768,
-0.06114652380347252,
-0.053540151566267014,
0.03774774819612503,
0.028547702357172966,
-0.02663889341056347,
-0.03691522032022476,
0.038113102316856384,
-0.04708274081349373,
0.001... | -0.000672 |
req.httpVersion, })); } ``` ```cjs const { createSecureServer } = require('node:http2'); const { readFileSync } = require('node:fs'); const cert = readFileSync('./cert.pem'); const key = readFileSync('./key.pem'); const server = createSecureServer( { cert, key, allowHTTP1: true }, onRequest, ).listen(4443); function on... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.03848078101873398,
0.06161317601799965,
-0.05753187835216522,
-0.030269237235188484,
0.012952986173331738,
-0.0801464095711708,
-0.08740994334220886,
0.028637757524847984,
0.0658949688076973,
0.0003741350374184549,
-0.038470178842544556,
-0.01309219654649496,
-0.03932827338576317,
0.034... | -0.042916 |
exactly as they were received. Only populated at the `'end'` event. #### `request.scheme` \* Type: {string} The request scheme pseudo header field indicating the scheme portion of the target URL. #### `request.setTimeout(msecs, callback)` \* `msecs` {number} \* `callback` {Function} \* Returns: {http2.Http2ServerReques... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.07843953371047974,
0.06320628523826599,
-0.02661426179111004,
0.0650227889418602,
0.027377212420105934,
-0.07151970267295837,
-0.03707379847764969,
0.008922973647713661,
0.12855252623558044,
-0.03758400306105614,
-0.0437023863196373,
0.060876648873090744,
-0.04538485407829285,
-0.028653... | 0.062589 |
field name or value that contains invalid characters will result in a [`TypeError`][] being thrown. ```js // Returns headers including "set-cookie: a" and "set-cookie: b" const server = http2.createServer((req, res) => { res.setHeader('set-cookie', 'a'); res.appendHeader('set-cookie', 'b'); res.writeHead(200); res.end(... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.0963573157787323,
0.06637632101774216,
-0.01930925063788891,
0.010658408515155315,
-0.05732780694961548,
-0.07699689269065857,
0.015154906548559666,
0.027858655899763107,
0.10003837198019028,
-0.026553167030215263,
-0.03595827892422676,
-0.03711315244436264,
-0.003930321428924799,
0.032... | -0.010862 |
This should only be disabled for testing; HTTP requires the Date header in responses. #### `response.setHeader(name, value)` \* `name` {string} \* `value` {string|string\[]} Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.08465780317783356,
0.09473803639411926,
0.0012241496006026864,
0.02786993235349655,
-0.019452782347798347,
-0.033338725566864014,
0.01085660606622696,
0.007424524519592524,
-0.008662287145853043,
-0.04688175022602081,
-0.044586338102817535,
-0.04601147770881653,
0.032954342663288116,
0.... | 0.018124 |
parts of the body. In the `node:http` module, the response body is omitted when the request is a HEAD request. Similarly, the `204` and `304` responses \_must not\_ include a message body. `chunk` can be a string or a buffer. If `chunk` is a string, the second parameter specifies how to encode it into a byte stream. By... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.05873270332813263,
0.021413955837488174,
-0.0012195971794426441,
0.03909093141555786,
-0.004881484899669886,
-0.12331505119800568,
-0.042029377073049545,
-0.05627267435193062,
0.09280255436897278,
-0.001615100190974772,
-0.04077298194169998,
0.08429093658924103,
-0.02101733535528183,
-0... | 0.11544 |
when the `Content-Length` does not match the actual payload size. This method may be called at most one time on a message before [`response.end()`][] is called. If [`response.write()`][] or [`response.end()`][] are called before calling this, the implicit/mutable headers will be calculated and call this function. When ... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.04843481257557869,
0.08735371381044388,
0.03820224106311798,
0.03156090900301933,
-0.003075161250308156,
-0.08450492471456528,
-0.06878624856472015,
0.09097964316606522,
0.07647676020860672,
-0.03265872597694397,
-0.0308101624250412,
-0.0012436878168955445,
0.010140552185475826,
-0.0259... | 0.021676 |
constructing an HTTP/2 request directly, and `host` when converting from HTTP/1 (in proxies, for instance). The compatibility API falls back to `host` if `:authority` is not present. See [`request.authority`][] for more information. However, if you don't use the compatibility API (or use `req.headers` directly), you ne... | https://github.com/nodejs/node/blob/main/doc/api/http2.md | main | nodejs | [
-0.0875546857714653,
0.08814673870801926,
0.030230021104216576,
-0.01363463792949915,
-0.03566456586122513,
-0.10258162766695023,
-0.07337749749422073,
-0.05496707931160927,
0.024804553017020226,
-0.011016638949513435,
-0.015615148469805717,
-0.0869145318865776,
0.04428716376423836,
0.0279... | -0.095909 |
# 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.2 - Release candidate. 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 us... | https://github.com/nodejs/node/blob/main/doc/api/sqlite.md | main | nodejs | [
-0.007115027401596308,
-0.023746855556964874,
-0.06588200479745865,
0.0847897008061409,
-0.03800543025135994,
-0.040897440165281296,
-0.003936433233320713,
0.10861687362194061,
-0.05775395780801773,
0.01826370693743229,
-0.007309505250304937,
0.02431976981461048,
0.04530486837029457,
-0.09... | 0.042822 |
the path should be the special name `':memory:'`. \* `options` {Object} Configuration options for the database connection. The following options are supported: \* `open` {boolean} If `true`, the database is opened by the constructor. When this value is `false`, the database must be opened via the `open()` method. \*\*D... | https://github.com/nodejs/node/blob/main/doc/api/sqlite.md | main | nodejs | [
0.059521738439798355,
-0.09059009701013565,
-0.15411143004894257,
0.04938729479908943,
-0.09653060883283615,
0.025026103481650352,
0.0032927882857620716,
0.05137983709573746,
-0.04063233360648155,
0.020286601036787033,
0.03328793868422508,
0.00582357682287693,
0.0651903972029686,
0.0442013... | 0.028761 |
\* `useBigIntArguments` {boolean} If `true`, integer arguments to `options.step` and `options.inverse` are converted to `BigInt`s. If `false`, integer arguments are passed as JavaScript numbers. \*\*Default:\*\* `false`. \* `varargs` {boolean} If `true`, `options.step` and `options.inverse` may be invoked with any numb... | https://github.com/nodejs/node/blob/main/doc/api/sqlite.md | main | nodejs | [
-0.07187933474779129,
-0.00330601679161191,
-0.015632320195436478,
0.016846034675836563,
-0.08300396800041199,
-0.07871009409427643,
0.08694781363010406,
0.05915522947907448,
-0.04494659975171089,
0.010997135192155838,
-0.029911814257502556,
0.0035688208881765604,
-0.026631632819771767,
-0... | 0.059803 |
{boolean} Whether to set the defensive flag. Enables or disables the defensive flag. When the defensive flag is active, language features that allow ordinary SQL to deliberately corrupt the database file are disabled. See [`SQLITE\_DBCONFIG\_DEFENSIVE`][] in the SQLite documentation for details. ### `database.location(... | https://github.com/nodejs/node/blob/main/doc/api/sqlite.md | main | nodejs | [
0.026486234739422798,
-0.016518380492925644,
-0.13150708377361298,
0.023174123838543892,
-0.0005354299210011959,
-0.05581359565258026,
0.10463550686836243,
0.0020364951342344284,
-0.05353706702589989,
0.05695529654622078,
0.07932239770889282,
0.015184508636593819,
0.05479377880692482,
-0.0... | 0.102661 |
const db = new DatabaseSync(':memory:'); // Set up an authorizer that denies all table creation db.setAuthorizer((actionCode) => { if (actionCode === constants.SQLITE\_CREATE\_TABLE) { return constants.SQLITE\_DENY; } return constants.SQLITE\_OK; }); // This will work db.prepare('SELECT 1').get(); // This will throw an... | https://github.com/nodejs/node/blob/main/doc/api/sqlite.md | main | nodejs | [
0.019502045586705208,
-0.0058220443315804005,
-0.10025479644536972,
0.08754009753465652,
-0.0280905794352293,
-0.047424137592315674,
0.0541430339217186,
0.022615958005189896,
-0.014095914550125599,
0.07536999136209488,
0.009037758223712444,
-0.042114902287721634,
0.02459092251956463,
-0.03... | 0.025803 |
to compile to a prepared statement. \* `options` {Object} Optional configuration for the prepared statement. \* `readBigInts` {boolean} If `true`, integer fields are read as `BigInt`s. \*\*Default:\*\* inherited from database options or `false`. \* `returnArrays` {boolean} If `true`, results are returned as arrays. \*\... | https://github.com/nodejs/node/blob/main/doc/api/sqlite.md | main | nodejs | [
0.03906451538205147,
0.022182578220963478,
-0.0809323713183403,
0.10974559932947159,
-0.1514246165752411,
-0.03658270090818405,
0.040288105607032776,
0.0376892015337944,
-0.11481991410255432,
0.0014027331490069628,
-0.03695152327418327,
-0.07498874515295029,
0.0954178124666214,
-0.07545780... | 0.04698 |
db = new DatabaseSync(':memory:'); const sql = db.createTagStore(); db.exec('CREATE TABLE users (id INT, name TEXT)'); // Using the 'run' method to insert data. // The tagged literal is used to identify the prepared statement. sql.run`INSERT INTO users VALUES (1, 'Alice')`; sql.run`INSERT INTO users VALUES (2, 'Bob')`;... | https://github.com/nodejs/node/blob/main/doc/api/sqlite.md | main | nodejs | [
0.04685789346694946,
0.02859925478696823,
-0.05516185238957405,
0.08812180906534195,
-0.09479253739118576,
-0.003512810682877898,
0.02450205758213997,
0.10050585120916367,
-0.04873000457882881,
0.0070678736083209515,
0.02308318205177784,
-0.003715836675837636,
0.08881034702062607,
-0.08118... | -0.017219 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.