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 |
|---|---|---|---|---|---|
Type: {number} The length of the AES key in bits. #### `aesKeyAlgorithm.name` \* Type: {string} ### Class: `AesKeyGenParams` #### `aesKeyGenParams.length` \* Type: {number} The length of the AES key to be generated. This must be either `128`, `192`, or `256`. #### `aesKeyGenParams.name` \* Type: {string} Must be one of... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
0.014317803084850311,
0.05283691734075546,
-0.1159772127866745,
0.008020891807973385,
-0.09414028376340866,
-0.04161529242992401,
0.0846666470170021,
0.03359289839863777,
-0.06258755177259445,
-0.02936331368982792,
-0.030130114406347275,
-0.08068139106035233,
0.03652995079755783,
-0.070175... | 0.020058 |
key (represented as {CryptoKey}) for message encryption and the ciphertext (that can be transmitted to the message recipient along with the message) encrypted by this shared key. The recipient uses their private key to determine what the shared key is which then allows them to decrypt the message. #### `encapsulatedKey... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
0.038637638092041016,
0.05651618912816048,
0.010096274316310883,
-0.01510854996740818,
-0.060476575046777725,
-0.006227427162230015,
0.06521297246217728,
-0.10174546390771866,
-0.024363534525036812,
-0.012881046161055565,
0.0066077918745577335,
-0.0750693827867508,
0.06382067501544952,
-0.... | 0.02674 |
{string} Must be `'KMAC128'` or `'KMAC256'`. #### `kmacParams.outputLength` \* Type: {number} The length of the output in bytes. This must be a positive integer. #### `kmacParams.customization` \* Type: {ArrayBuffer|TypedArray|DataView|Buffer|undefined} The `customization` member represents the optional customization s... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
0.06870278716087341,
0.077916719019413,
-0.023631276562809944,
-0.08607056736946106,
-0.1008089929819107,
-0.019421398639678955,
0.035226136445999146,
-0.026128733530640602,
-0.078669473528862,
-0.024598048999905586,
-0.042176730930805206,
-0.09850718826055527,
0.0970456451177597,
-0.05536... | -0.062901 |
#subtledecryptalgorithm-key-data [`subtle.deriveBits()`]: #subtlederivebitsalgorithm-basekey-length [`subtle.deriveKey()`]: #subtlederivekeyalgorithm-basekey-derivedkeytype-extractable-keyusages [`subtle.digest()`]: #subtledigestalgorithm-data [`subtle.encapsulateBits()`]: #subtleencapsulatebitsencapsulationalgorithm-e... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.03422749787569046,
0.009720951318740845,
0.006204152479767799,
0.03481930121779442,
0.04220214858651161,
-0.02608800306916237,
0.010311092250049114,
0.010388536378741264,
-0.009112442843616009,
-0.009042873978614807,
0.05656733736395836,
-0.1517917364835739,
0.0035928930155932903,
-0.06... | -0.038618 |
# Web Streams API > Stability: 2 - Stable An implementation of the [WHATWG Streams Standard][]. ## Overview The [WHATWG Streams Standard][] (or "web streams") defines an API for handling streaming data. It is similar to the Node.js [Streams][] API but emerged later and has become the "standard" API for streaming data a... | https://github.com/nodejs/node/blob/main/doc/api/webstreams.md | main | nodejs | [
-0.0948198214173317,
0.02281138300895691,
-0.03284067288041115,
0.02970902808010578,
0.03179357945919037,
-0.06194675341248512,
-0.037575408816337585,
0.032261960208415985,
0.005973695311695337,
-0.02046259120106697,
-0.061139583587646484,
0.05993185564875603,
-0.04579208791255951,
0.01888... | 0.17619 |
} from 'node:stream/web'; const stream = new ReadableStream(); const reader = stream.getReader(); console.log(await reader.read()); ``` ```cjs const { ReadableStream } = require('node:stream/web'); const stream = new ReadableStream(); const reader = stream.getReader(); reader.read().then(console.log); ``` Causes the `r... | https://github.com/nodejs/node/blob/main/doc/api/webstreams.md | main | nodejs | [
-0.03964050114154816,
0.03958649933338165,
-0.02760631963610649,
0.01949886605143547,
0.026933468878269196,
-0.015514177270233631,
-0.045212987810373306,
0.0671461969614029,
-0.003112252103164792,
0.008931674063205719,
-0.05010150745511055,
0.05985693633556366,
-0.07582592219114304,
0.0106... | 0.050105 |
(via either a `break`, `return`, or a `throw`), the {ReadableStream} will be closed. To prevent automatic closing of the {ReadableStream}, use the `readableStream.values()` method to acquire the async iterator and set the `preventCancel` option to `true`. The {ReadableStream} must not be locked (that is, it must not ha... | https://github.com/nodejs/node/blob/main/doc/api/webstreams.md | main | nodejs | [
-0.07515381276607513,
-0.012918292544782162,
-0.05615874379873276,
0.036273662000894547,
-0.01262836903333664,
-0.028268270194530487,
-0.02189086750149727,
-0.005613046698272228,
0.022368911653757095,
-0.06292637437582016,
-0.03954998031258583,
0.05926546826958656,
-0.050437599420547485,
-... | 0.032032 |
controller; } async pull(controller) { const view = controller.byobRequest?.view; const { bytesRead, } = await this.file.read({ buffer: view, offset: view.byteOffset, length: view.byteLength, }); if (bytesRead === 0) { await this.file.close(); this.controller.close(); } controller.byobRequest.respond(bytesRead); } } co... | https://github.com/nodejs/node/blob/main/doc/api/webstreams.md | main | nodejs | [
-0.024082044139504433,
-0.007631510030478239,
-0.086110919713974,
-0.0028448179364204407,
-0.02933908998966217,
-0.012065206654369831,
-0.0059317597188055515,
0.07045620679855347,
-0.001396618434228003,
-0.01674404926598072,
-0.031259238719940186,
0.03900708630681038,
-0.11979500204324722,
... | 0.013337 |
object is used to gain access to the `ArrayBuffer`/`TypedArray` that has been provided for the read request to fill, and provides methods for signaling that the data has been provided. #### `readableStreamBYOBRequest.respond(bytesWritten)` \* `bytesWritten` {number} Signals that a `bytesWritten` number of bytes have be... | https://github.com/nodejs/node/blob/main/doc/api/webstreams.md | main | nodejs | [
-0.01702454872429371,
0.0298245158046484,
-0.007499085273593664,
0.027951080352067947,
-0.08985395729541779,
-0.05805157497525215,
0.0575065053999424,
0.02378213405609131,
0.017728291451931,
-0.004153494723141193,
-0.11645437777042389,
0.0717678815126419,
-0.040987562388181686,
-0.01165770... | 0.151072 |
A promise fulfilled with `undefined`. Appends a new chunk of data to the {WritableStream}'s queue. ### Class: `WritableStreamDefaultController` The `WritableStreamDefaultController` manages the {WritableStream}'s internal state. #### `writableStreamDefaultController.error([error])` \* `error` {any} Called by user-code ... | https://github.com/nodejs/node/blob/main/doc/api/webstreams.md | main | nodejs | [
-0.11645463109016418,
0.03619779646396637,
-0.010904360562562943,
0.03600002080202103,
-0.0012104188790544868,
-0.06906195729970932,
-0.008442887105047703,
0.012747314758598804,
0.07270587235689163,
0.020387960597872734,
-0.011901180259883404,
0.1058042049407959,
-0.04419684782624245,
-0.0... | 0.123009 |
`byteLengthQueuingStrategy.highWaterMark` \* Type: {number} #### `byteLengthQueuingStrategy.size` \* Type: {Function} \* `chunk` {any} \* Returns: {number} ### Class: `CountQueuingStrategy` #### `new CountQueuingStrategy(init)` \* `init` {Object} \* `highWaterMark` {number} #### `countQueuingStrategy.highWaterMark` \* ... | https://github.com/nodejs/node/blob/main/doc/api/webstreams.md | main | nodejs | [
-0.09615132212638855,
0.018262328580021858,
0.02457088604569435,
0.016324935480952263,
-0.03392963856458664,
-0.05736064538359642,
0.07178377360105515,
0.03724085912108421,
0.0012073395773768425,
-0.07280778139829636,
-0.039691075682640076,
-0.048326727002859116,
-0.0084533104673028,
-0.00... | 0.045941 |
= Buffer.from('hello world from consumers!'); const readable = Readable.from(dataBuffer); const data = await buffer(readable); console.log(`from readable: ${data.length}`); // Prints: from readable: 27 ``` ```cjs const { buffer } = require('node:stream/consumers'); const { Readable } = require('node:stream'); const { B... | https://github.com/nodejs/node/blob/main/doc/api/webstreams.md | main | nodejs | [
-0.0037166066467761993,
0.05397067219018936,
-0.013936080038547516,
0.030742520466446877,
-0.006682811304926872,
-0.05676955729722977,
0.022046206519007683,
0.0338805690407753,
-0.017396382987499237,
-0.041366856545209885,
-0.017767900601029396,
-0.013922275975346565,
-0.04625987261533737,
... | 0.017355 |
# WebAssembly System Interface (WASI) > Stability: 1 - Experimental **The `node:wasi` module does not currently provide the comprehensive file system security properties provided by some WASI runtimes. Full support for secure file system sandboxing may or may not be implemented in future. In the mean time, do not rely ... | https://github.com/nodejs/node/blob/main/doc/api/wasi.md | main | nodejs | [
-0.09281798452138901,
0.07468502968549728,
-0.07204040884971619,
0.0014209786895662546,
0.0537082813680172,
-0.09337424486875534,
-0.01228646282106638,
0.09657612442970276,
-0.049359939992427826,
0.03186136856675148,
-0.0030320454388856888,
0.020341161638498306,
0.001964573748409748,
-0.05... | 0.202571 |
`options` {Object} \* `args` {Array} An array of strings that the WebAssembly application will see as command-line arguments. The first argument is the virtual path to the WASI command itself. \*\*Default:\*\* `[]`. \* `env` {Object} An object similar to `process.env` that the WebAssembly application will see as its en... | https://github.com/nodejs/node/blob/main/doc/api/wasi.md | main | nodejs | [
-0.010595454834401608,
0.03898078575730324,
-0.03911858797073364,
0.019109878689050674,
0.01908458024263382,
-0.048139408230781555,
-0.017583312466740608,
0.05469302088022232,
-0.00015036456170491874,
0.04215289652347565,
0.021502375602722168,
0.017926093190908432,
-0.022821424528956413,
-... | 0.154813 |
# URL > Stability: 2 - Stable The `node:url` module provides utilities for URL resolution and parsing. It can be accessed using: ```mjs import url from 'node:url'; ``` ```cjs const url = require('node:url'); ``` ## URL strings and URL objects A URL string is a structured string containing multiple meaningful components... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.13083332777023315,
0.058482877910137177,
0.05109316483139992,
0.00903412513434887,
-0.00975057203322649,
-0.0760059803724289,
-0.0941990464925766,
0.043733205646276474,
0.021500542759895325,
-0.027616450563073158,
-0.062405116856098175,
0.052040133625268936,
0.006888257339596748,
0.0016... | 0.080415 |
`base` {string} The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is [converted to a string][] first. Creates a new `URL` object by parsing the `input` relative to the `base`. If `base` is passed as a string, it will be parsed equivalent to `new URL(base)`. ```js const myURL ... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.0634220764040947,
0.04307990148663521,
0.037569310516119,
0.012882005423307419,
-0.035060763359069824,
-0.05973699316382408,
-0.10051917284727097,
0.06687071919441223,
0.06534727662801743,
-0.0009306793217547238,
-0.05605098605155945,
0.012601092457771301,
-0.004190323408693075,
0.04536... | 0.078087 |
read-only serialization of the URL's origin. ```js const myURL = new URL('https://example.org/foo/bar?baz'); console.log(myURL.origin); // Prints https://example.org ``` ```js const idnURL = new URL('https://測試'); console.log(idnURL.origin); // Prints https://xn--g6w251d console.log(idnURL.hostname); // Prints xn--g6w2... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.0513337217271328,
0.03398556634783745,
-0.023862620815634727,
-0.034147318452596664,
-0.04398978501558304,
-0.06973718851804733,
-0.041717104613780975,
0.013844168744981289,
0.09959288686513901,
-0.032060407102108,
-0.07754428684711456,
0.08896175026893616,
0.017109818756580353,
0.00614... | -0.011215 |
schemes The [WHATWG URL Standard][] considers a handful of URL protocol schemes to be \_special\_ in terms of how they are parsed and serialized. When a URL is parsed using one of these special protocols, the `url.protocol` property may be changed to another special protocol but cannot be changed to a non-special proto... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.08279314637184143,
0.03224664926528931,
0.005772463511675596,
-0.05297871306538582,
-0.028827829286456108,
-0.06930074840784073,
-0.0402342714369297,
-0.01792421005666256,
0.02888895571231842,
-0.0044337050057947636,
-0.018983203917741776,
0.043725963681936264,
-0.04798027127981186,
0.1... | 0.083899 |
retained in memory until `URL.revokeObjectURL()` is called to remove it. `Blob` objects are registered within the current thread. If using Worker Threads, `Blob` objects registered within one Worker will not be available to other workers or the main thread. #### `URL.revokeObjectURL(id)` \* `id` {string} A `'blob:noded... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.0778421089053154,
0.07068487256765366,
-0.03421219065785408,
0.07443239539861679,
-0.06314422190189362,
-0.05390917882323265,
0.01517126988619566,
-0.044741082936525345,
0.021096687763929367,
-0.02594481222331524,
-0.04883526265621185,
0.07543071359395981,
0.0643884539604187,
-0.0339830... | 0.122869 |
`hostname`, `port`, `pathname`, `search`, `hash` or `baseURL`. If `baseURL` is not specified, it defaults to `undefined`. An option can have `ignoreCase` boolean attribute which enables case-insensitive matching if set to true. The constructor can throw a `TypeError` to indicate parsing failure. #### `urlPattern.exec(i... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.06037912890315056,
0.02000274509191513,
-0.041092649102211,
0.0035912066232413054,
-0.0603095181286335,
-0.11392602324485779,
-0.009633674286305904,
0.03776184841990471,
-0.01998729817569256,
-0.018468424677848816,
0.0035956630017608404,
-0.017059914767742157,
0.04861051216721535,
0.038... | 0.129208 |
pairs Instantiate a new `URLSearchParams` object with a query hash map. The key and value of each property of `obj` are always coerced to strings. Unlike [`querystring`][] module, duplicate keys in the form of array values are not allowed. Arrays are stringified using [`array.toString()`][], which simply joins all arra... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
0.005259530618786812,
0.07003135234117508,
-0.044757142663002014,
0.02359655871987343,
-0.11981606483459473,
0.034211087971925735,
0.026897616684436798,
0.04353989660739899,
0.019647100940346718,
-0.0793662965297699,
-0.04435610771179199,
0.029647983610630035,
0.019717473536729813,
0.01010... | 0.040331 |
provided, returns `true` if there is at least one name-value pair whose name is `name`. #### `urlSearchParams.keys()` \* Returns: {Iterator} Returns an ES6 `Iterator` over the names of each name-value pair. ```js const params = new URLSearchParams('foo=bar&foo=baz'); for (const name of params.keys()) { console.log(name... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.0653982162475586,
0.0730062872171402,
-0.006003713700920343,
0.04492955282330513,
-0.10235613584518433,
-0.0009704598924145103,
0.046086881309747696,
0.0023160323034971952,
0.0560787171125412,
-0.06428766250610352,
-0.032974209636449814,
0.013094806112349033,
0.0294913612306118,
-0.0329... | 0.011058 |
encoded directory traversal sequences (such as `%2e%2e`) are decoded and processed as actual path traversal, even though encoded slashes (`%2F`, `%5C`) are correctly rejected. \*\*Applications must not rely on `fileURLToPath()` alone to prevent directory traversal attacks.\*\* Always perform explicit path validation an... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.054906055331230164,
0.0358070470392704,
0.026466958224773407,
0.023557191714644432,
-0.031556546688079834,
-0.05426989123225212,
-0.044334474951028824,
0.09838520735502243,
0.029597915709018707,
0.02379508875310421,
-0.01012391783297062,
0.01608632504940033,
0.04261937737464905,
0.09106... | 0.077525 |
`options` {Object} \* `windows` {boolean|undefined} `true` if the `path` should be treated as a windows filepath, `false` for posix, and `undefined` for the system default. \*\*Default:\*\* `undefined`. \* Returns: {URL} The file URL object. This function ensures that `path` is resolved absolutely, and that the URL con... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.06160149723291397,
0.041350509971380234,
0.012223192490637302,
0.04039697349071503,
-0.049663297832012177,
-0.032152507454156876,
-0.02748579904437065,
0.04366258904337883,
0.05792635679244995,
0.02375437505543232,
0.00523028988391161,
0.01319237519055605,
0.008007105439901352,
0.062267... | 0.020856 |
a concatenation of the `pathname` and `search` components. For example: `'/p/a/t/h?query=string'`. No decoding of the `path` is performed. #### `urlObject.pathname` The `pathname` property consists of the entire path section of the URL. This is everything following the `host` (including the `port`) and before the start... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.043471239507198334,
0.03514281287789345,
-0.020322106778621674,
-0.00294945458881557,
-0.0645487904548645,
-0.0560850091278553,
-0.022031821310520172,
0.007429542951285839,
0.04887305945158005,
-0.03992151468992233,
-0.00020509825844783336,
0.031452130526304245,
0.06546986103057861,
0.0... | 0.092298 |
not an empty string: \* If the `urlObject.pathname` \_does not start\_ with an ASCII forward slash (`/`), then the literal string `'/'` is appended to `result`. \* The value of `urlObject.pathname` is appended to `result`. \* Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an [`Error`][] is t... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.02164560928940773,
0.04180167242884636,
0.005548363085836172,
0.05947760492563248,
-0.08989357203245163,
-0.009982236661016941,
0.027062999084591866,
0.054177675396203995,
0.033323679119348526,
-0.045421987771987915,
0.0041357725858688354,
-0.04816729947924614,
0.06735634058713913,
0.00... | 0.100458 |
assumes well-formed headers are forwarded from a reverse proxy to your Node.js server. If you are not using a reverse proxy, you should use the example below: ```js function getURL(req) { return new URL(`https://example.com${req.url || '/'}`); } ``` An automated migration is available ([source](https://github.com/nodej... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.043361350893974304,
0.07046017795801163,
0.0729401484131813,
-0.024122409522533417,
0.05187845230102539,
-0.06831599026918411,
-0.09082787483930588,
0.021388454362750053,
0.021924812346696854,
0.0702594667673111,
-0.06461374461650848,
-0.0035614618100225925,
-0.0035221369471400976,
-0.0... | 0.003104 |
\_both\_ Punycode encoded and percent-encoded characters: ```js const myURL = new URL('https://%CF%80.example.com/foo'); console.log(myURL.href); // Prints https://xn--1xa.example.com/foo console.log(myURL.origin); // Prints https://xn--1xa.example.com ``` [Punycode]: https://tools.ietf.org/html/rfc5891#section-4.4 [WH... | https://github.com/nodejs/node/blob/main/doc/api/url.md | main | nodejs | [
-0.05313440412282944,
0.0010170319583266973,
0.0002862058172468096,
0.003485160181298852,
0.007347812410444021,
-0.030186474323272705,
-0.011103369295597076,
0.032896701246500015,
0.025420259684324265,
-0.03434345871210098,
0.018395697697997093,
-0.011881941929459572,
0.00516730360686779,
... | 0.040032 |
# TLS (SSL) > Stability: 2 - Stable The `node:tls` module provides an implementation of the Transport Layer Security (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. The module can be accessed using: ```mjs import tls from 'node:tls'; ``` ```cjs const tls = require('node:tls'); ``` ## Dete... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.08910638093948364,
0.008051136508584023,
0.0032851588912308216,
0.03987649083137512,
0.055867910385131836,
-0.0478174164891243,
-0.01575102098286152,
0.0068704839795827866,
0.01839476451277733,
-0.03305163234472275,
0.0004697381518781185,
0.03522758185863495,
0.04684773460030556,
0.0471... | 0.087794 |
to obtain the key-pair specifically generated for the session. Perfect forward secrecy is achieved by randomly generating a key pair for key-agreement on every TLS/SSL handshake (in contrast to using the same key for all sessions). Methods implementing this technique are called "ephemeral". Currently two methods are co... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.06202703341841698,
0.06677869707345963,
-0.004770096857100725,
0.03243556246161461,
-0.0641724243760109,
0.01117847952991724,
0.02623610757291317,
0.018832562491297722,
0.1134151816368103,
0.005041700787842274,
0.0352548211812973,
0.004594440571963787,
-0.01953035406768322,
-0.035936310... | 0.10144 |
the server to help the client decide which identity to use during negotiation. Always `null` if TLS 1.3 is used. \* Returns: {Object} in the form `{ psk: , identity: }` or `null`. Then on the server: \* `socket` {tls.TLSSocket} the server socket instance, equivalent to `this`. \* `identity` {string} identity parameter ... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.1368507444858551,
0.1617908924818039,
-0.05693463981151581,
0.027528731152415276,
-0.06707275658845901,
-0.03710485249757767,
0.12643641233444214,
-0.029637152329087257,
0.17226868867874146,
0.016095725819468498,
-0.0001796288270270452,
-0.01996130309998989,
0.04165654629468918,
-0.0119... | 0.074827 |
returns a value, the session data contains a ticket, otherwise it contains client-side session state. With TLSv1.3, be aware that multiple tickets may be sent by the server, resulting in multiple `'session'` events, see [`'session'`][] for more information. Single process servers need no specific implementation to use ... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.07752581685781479,
0.07601775228977203,
-0.07186450064182281,
-0.05139537900686264,
-0.06386946886777878,
-0.07273703068494797,
0.07515940070152283,
-0.008694001473486423,
0.10647723078727722,
0.04465165734291077,
-0.06962201744318008,
-0.028218818828463554,
0.07757313549518585,
-0.0009... | -0.061445 |
':!ECDHE-RSA-AES128-SHA:!ECDHE-RSA-AES128-SHA256:!ECDHE-RSA-AES256-SHA:!ECDHE-RSA-AES256-SHA384' + ':!ECDHE-ECDSA-AES128-SHA:!ECDHE-ECDSA-AES128-SHA256:!ECDHE-ECDSA-AES256-SHA:!ECDHE-ECDSA-AES256-SHA384' + ':!kRSA'; ``` The default can also be replaced on a per client or server basis using the `ciphers` option from [`t... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.026190582662820816,
0.07843054831027985,
-0.027681509032845497,
-0.06449371576309204,
0.009528074413537979,
-0.02163807488977909,
-0.031528446823358536,
-0.061035092920064926,
0.09546490758657455,
-0.030480507761240005,
0.013978252187371254,
-0.016913628205657005,
0.03269577398896217,
-... | -0.052512 |
'DEFAULT@SECLEVEL=0', maxVersion: 'TLSv1' }); }); ``` This approach sets the security level to 0, allowing the use of legacy features while still leveraging the default OpenSSL ciphers. ### Using [`--tls-cipher-list`][] You can also set the security level and ciphers from the command line using the `--tls-cipher-list=D... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.03471735119819641,
0.07824601978063583,
-0.0943220779299736,
-0.0016681262059137225,
-0.027067560702562332,
-0.040527645498514175,
-0.03538507968187332,
0.05224870145320892,
-0.012690029107034206,
-0.0512860007584095,
0.05081307515501976,
-0.06594204902648926,
0.09618167579174042,
0.064... | -0.046531 |
the traffic: ```js const logFile = fs.createWriteStream('/tmp/ssl-keys.log', { flags: 'a' }); // ... server.on('keylog', (line, tlsSocket) => { if (tlsSocket.remoteAddress !== '...') return; // Only log keys for a particular IP logFile.write(line); }); ``` ### Event: `'newSession'` The `'newSession'` event is emitted u... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.029913539066910744,
0.07676499336957932,
-0.00709226168692112,
0.019834833219647408,
-0.019699126482009888,
-0.07810559123754501,
0.058624714612960815,
0.025812288746237755,
0.142491415143013,
0.007234432268887758,
-0.07496992498636246,
0.07355727255344391,
-0.012875821441411972,
0.0365... | 0.018168 |
created. It is possible to call `callback(err)` to terminate the incoming connection and destroy the socket. Listening for this event will have an effect only on connections established after the addition of the event listener. The following illustrates resuming a TLS session: ```js const tlsSessionStore = {}; server.o... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.08898966014385223,
0.09154465794563293,
-0.019971473142504692,
0.05715964362025261,
-0.06200730800628662,
-0.04884664714336395,
0.06151158735156059,
-0.046164970844984055,
0.10638123750686646,
-0.02251092717051506,
-0.04226111248135567,
0.08534494787454605,
0.016908977180719376,
0.01188... | 0.005649 |
and all required TLS negotiation. Instances of `tls.TLSSocket` implement the duplex [Stream][] interface. Methods that return TLS connection metadata (e.g. [`tls.TLSSocket.getPeerCertificate()`][]) will only return data while the connection is open. ### `new tls.TLSSocket(socket[, options])` \* `socket` {net.Socket|str... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.08722928911447525,
0.05066375806927681,
-0.04692450538277626,
0.01846608892083168,
-0.1328732818365097,
-0.0665794163942337,
0.0023854365572333336,
-0.009533162228763103,
0.06125903129577637,
-0.049031805247068405,
-0.025008386000990868,
0.038826361298561096,
0.010295145213603973,
0.027... | -0.014533 |
to determine the negotiated protocol. The `'secureConnect'` event is not emitted when a {tls.TLSSocket} is created using the `new tls.TLSSocket()` constructor. ### Event: `'session'` \* `session` {Buffer} The `'session'` event is emitted on a client `tls.TLSSocket` when a new session or TLS ticket is available. This ma... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.061784591525793076,
0.06085623800754547,
-0.017763329669833183,
0.020758336409926414,
-0.02753310836851597,
-0.05086842551827431,
0.06458847969770432,
-0.02359490841627121,
0.1445278823375702,
-0.03046511486172676,
-0.030004695057868958,
0.025654708966612816,
0.013704868033528328,
0.018... | 0.007735 |
the certificate. See [`tls.TLSSocket.getPeerCertificate()`][] for an example of the certificate structure. If there is no local certificate, an empty object will be returned. If the socket has been destroyed, `null` will be returned. ### `tlsSocket.getCipher()` \* Returns: {Object} \* `name` {string} OpenSSL name for t... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.029567433521151543,
0.09372323751449585,
-0.00846589170396328,
0.033680204302072525,
-0.02304634265601635,
-0.04319491609930992,
-0.04243931919336319,
-0.025817861780524254,
0.08172435313463211,
-0.06313522160053253,
-0.03448278084397316,
0.021518155932426453,
0.024087557569146156,
0.02... | -0.021631 |
DER encoded certificate. It is returned as a `:` separated hexadecimal string. Example: `'2A:7A:C2:DD:...'`. \* `ext\_key\_usage` {Array} (Optional) The extended key usage, a set of OIDs. \* `subjectaltname` {string} (Optional) A string containing concatenated names for the subject, an alternative to the `subject` name... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.009189398027956486,
0.08648376166820526,
-0.08799853175878525,
0.03036639094352722,
0.0077958013862371445,
-0.048582617193460464,
0.0876004546880722,
0.07189574092626572,
0.09877058118581772,
-0.0868082195520401,
-0.006948383990675211,
-0.010684587061405182,
0.04537244141101837,
0.04434... | 0.094306 |
data can be provided to the `session` option of [`tls.connect()`][] to resume the connection. On the server, it may be useful for debugging. See [Session Resumption][] for more information. Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications must use the [`'session'`][] event (it also works... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.03372891619801521,
0.10479722917079926,
-0.054645080119371414,
-0.011653539724647999,
-0.036585334688425064,
-0.07368423044681549,
0.01827491633594036,
0.006611493416130543,
0.0677851215004921,
-0.09381639212369919,
-0.060423485934734344,
0.013392699882388115,
0.018745891749858856,
-0.0... | -0.052558 |
can be delayed due to packet loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, which may decrease overall server throughput. ## `tls.checkServerIdentity(hostname, cert)` \* `hostname` {string} The host name or IP address to verify the certificate against. \* `cert` {Object} A ... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.05611032992601395,
0.06637298315763474,
0.0368446409702301,
0.04251515120267868,
0.0518793985247612,
-0.15291687846183777,
-0.016832582652568817,
-0.025018570944666862,
0.06836585700511932,
-0.003029406536370516,
0.0430523119866848,
0.027216888964176178,
0.03204329311847687,
0.017939694... | -0.088552 |
the builtin `tls.checkServerIdentity()` function) when checking the server's host name (or the provided `servername` when explicitly set) against the certificate. This should return an {Error} if verification fails. The method should return `undefined` if the `servername` and `cert` are verified. \* `session` {Buffer} ... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.08730915933847427,
0.10605417937040329,
0.006550112273544073,
0.05075446143746376,
0.022736987099051476,
-0.19247379899024963,
0.05417666956782341,
-0.01868613064289093,
0.09787440299987793,
-0.04233534261584282,
0.011801110580563545,
-0.012250857427716255,
0.03047410026192665,
0.034241... | -0.053338 |
socket.on('end', () => { console.log('server ends connection'); }); ``` To generate the certificate and key for this example, run: ```bash openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \ -keyout client-key.pem -out client-cert.pem ``` Then, to generate the `server-cert.pem` certificate for thi... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.03400948643684387,
0.05966281145811081,
-0.08388440310955048,
0.01870424672961235,
-0.03588249161839485,
-0.04562190920114517,
-0.05638083070516586,
0.029735291376709938,
0.04833555594086647,
-0.007565638981759548,
-0.016737084835767746,
0.0006605364033021033,
0.049443114548921585,
0.01... | -0.109787 |
replacing the default. For more information, see [Modifying the default TLS cipher suite][]. Permitted ciphers can be obtained via [`tls.getCiphers()`][]. Cipher names must be uppercased in order for OpenSSL to accept them. \* `clientCertEngine` {string} Name of an OpenSSL engine which can provide the client certificat... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.06873111426830292,
0.12248289585113525,
0.017295828089118004,
0.00865686871111393,
-0.06665442883968353,
-0.020571211352944374,
-0.044959522783756256,
0.0011731676058843732,
0.04708392173051834,
-0.07241220772266388,
0.00607707304880023,
-0.04045579209923744,
0.016253601759672165,
0.017... | -0.057094 |
from [OpenSSL Options][]. \* `secureProtocol` {string} Legacy mechanism to select the TLS protocol version to use, it does not support independent control of the minimum and maximum version, and does not support limiting the protocol to TLSv1.3. Use `minVersion` and `maxVersion` instead. The possible values are listed ... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.021563736721873283,
0.08409812301397324,
-0.09702662378549576,
-0.07312321662902832,
-0.026087846606969833,
-0.03754229471087456,
-0.001614162465557456,
0.007630526088178158,
0.04700218886137009,
0.003997748252004385,
-0.02780742570757866,
-0.019177280366420746,
0.01260096114128828,
0.0... | -0.04737 |
OpenSSL engine which can provide the client certificate. \*\*Deprecated.\*\* \* `enableTrace` {boolean} If `true`, [`tls.TLSSocket.enableTrace()`][] will be called on new connections. Tracing can be enabled after the secure connection is established, but this option must be used to trace the secure connection setup. \*... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.07443734258413315,
0.06693559885025024,
-0.026038898155093193,
0.0602293461561203,
-0.028196603059768677,
-0.04765722155570984,
-0.042454447597265244,
-0.026445947587490082,
0.09242987632751465,
-0.08164472132921219,
0.006535319611430168,
0.02855636365711689,
0.06436192989349365,
0.0421... | 0.016142 |
openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \ -keyout server-key.pem -out server-cert.pem ``` Then, to generate the `client-cert.pem` certificate for this example, run: ```bash openssl pkcs12 -certpbe AES-256-CBC -export -out client-cert.pem \ -inkey server-key.pem -in server-cert.pem ``` Th... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.0182409156113863,
0.06920014321804047,
-0.034270692616701126,
0.0182894729077816,
-0.015260630287230015,
-0.02138221450150013,
-0.046947140246629715,
0.007876354269683361,
0.04022648185491562,
-0.0047397976741194725,
-0.04586034640669823,
-0.017870383337140083,
0.08898139744997025,
0.02... | -0.115116 |
is a snapshot of Mozilla CA store that is fixed at release time. It is identical on all supported platforms. To get the actual CA certificates used by the current Node.js instance, which may include certificates loaded from the system store (if `--use-system-ca` is used) or loaded from a file indicated by `NODE\_EXTRA\... | https://github.com/nodejs/node/blob/main/doc/api/tls.md | main | nodejs | [
-0.044873371720314026,
0.07691973447799683,
-0.02021276019513607,
0.010402129031717777,
-0.0028962334617972374,
-0.07348605245351791,
-0.03080015629529953,
-0.00711921276524663,
0.11840370297431946,
-0.0465722382068634,
0.0070226374082267284,
-0.03106318786740303,
0.05978960171341896,
0.04... | -0.010766 |
# Deprecated APIs Node.js APIs might be deprecated for any of the following reasons: \* Use of the API is unsafe. \* An improved alternative API is available. \* Breaking changes to the API are expected in a future major release. Node.js uses four kinds of deprecations: \* Documentation-only \* Application (non-`node\_... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.053394146263599396,
0.03541310131549835,
0.10955269634723663,
0.05459776893258095,
0.12454171478748322,
-0.030232427641749382,
-0.12396951019763947,
0.0575823150575161,
0.044569943100214005,
0.036873962730169296,
-0.022380227223038673,
0.10032615065574646,
-0.013044399209320545,
-0.0254... | 0.068899 |
a new [`worker.exitedAfterDisconnect`][] property. The old property name did not precisely describe the actual semantics and was unnecessarily emotion-laden. ### DEP0008: `require('node:constants')` Type: Documentation-only The `node:constants` module is deprecated. When requiring access to constants relevant to specif... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.0637957900762558,
0.02365082874894142,
-0.03711649402976036,
0.06932836025953293,
0.10079479962587357,
-0.09103351831436157,
-0.06786616146564484,
0.020604955032467842,
0.001241897465661168,
-0.03263336047530174,
-0.048017919063568115,
-0.009047981351613998,
-0.018558785319328308,
0.025... | 0.016479 |
`util.debug()` has been removed. Please use [`console.error()`][] instead. An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-print-to-console-log)): ```bash npx codemod@latest @nodejs/util-print-to-console-log ``` ### DEP0029: `util.error()` Type: End-of-... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
0.0013320643920451403,
0.010376950725913048,
0.015186593867838383,
0.0033303105738013983,
0.12430167198181152,
-0.07579895853996277,
-0.041574571281671524,
0.007126449141651392,
-0.0029767071828246117,
0.061127595603466034,
0.0006061794119887054,
-0.03726239129900932,
-0.0525052472949028,
... | 0.044534 |
undefined` instead. An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-is)): ```bash npx codemod@latest @nodejs/util-is ``` ### DEP0052: `util.isNumber()` Type: End-of-Life The `util.isNumber()` API has been removed. Please use `typeof arg === 'number'` in... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.0270330011844635,
0.01578391343355179,
0.006560153793543577,
0.004740134812891483,
0.0921337902545929,
-0.022339845076203346,
-0.025356799364089966,
-0.023256342858076096,
0.02069993130862713,
0.02440246194601059,
0.008026735857129097,
-0.06169723719358444,
-0.08107537031173706,
0.01347... | 0.157092 |
The `OutgoingMessage.prototype.\_headers` and `OutgoingMessage.prototype.\_headerNames` properties were never documented as officially supported properties. An automated migration is available ([source](https://github.com/nodejs/userland-migrations/tree/main/recipes/http-outgoingmessage-headers)): ```bash npx codemod@l... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.05796338990330696,
0.0316125825047493,
0.06925761699676514,
-0.005403571296483278,
0.12295031547546387,
-0.09146147966384888,
-0.044341061264276505,
0.02168951742351055,
0.005005350336432457,
0.04610411822795868,
-0.05461585521697998,
-0.062195248901844025,
-0.030000563710927963,
0.0137... | 0.070488 |
were: \* `v8/tools/codemap` \* `v8/tools/consarray` \* `v8/tools/csvparser` \* `v8/tools/logreader` \* `v8/tools/profile\_view` \* `v8/tools/profile` \* `v8/tools/SourceMap` \* `v8/tools/splaytree` \* `v8/tools/tickprocessor-driver` \* `v8/tools/tickprocessor` \* `node-inspect/lib/\_inspect` (from 7.6.0) \* `node-inspe... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.07300719618797302,
-0.0166715569794178,
-0.01466420479118824,
0.0034166977275162935,
0.12599046528339386,
-0.058623190969228745,
-0.04440770670771599,
-0.012415715493261814,
-0.06267291307449341,
-0.028856202960014343,
0.02117861807346344,
-0.04710456728935242,
-0.0015163901261985302,
-... | 0.026136 |
Type: End-of-Life The `--with-lttng` compile-time option has been removed. ### DEP0102: Using `noAssert` in `Buffer#(read|write)` operations Type: End-of-Life Using the `noAssert` argument has no functionality anymore. All input is verified regardless of the value of `noAssert`. Skipping the verification could lead to ... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.07948499172925949,
0.07447498291730881,
0.01944178156554699,
-0.027392635121941566,
-0.0041709584183990955,
-0.1007641926407814,
-0.05173585191369057,
0.12256024032831192,
-0.028792135417461395,
0.025347573682665825,
-0.018805118277668953,
-0.022299304604530334,
-0.009128322824835777,
0... | 0.005863 |
`crypto.prng()` and `crypto.rng()` in favor of [`crypto.randomBytes()`][] and might be removed in a future release. ### DEP0116: Legacy URL API Type: Deprecation revoked The [legacy URL API][] is deprecated. This includes [`url.format()`][], [`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.0746801570057869,
0.04295678064227104,
0.000269292329903692,
-0.009285323321819305,
0.08948734402656555,
-0.07923896610736847,
-0.10992896556854248,
0.0015844959998503327,
-0.020051658153533936,
0.02917092852294445,
-0.06417024880647659,
-0.027560057118535042,
0.0004817296576220542,
0.0... | 0.006189 |
Type: Documentation-only (supports [`--pending-deprecation`][]) The `process.\_tickCallback` property was never documented as an officially supported API. ### DEP0135: `WriteStream.open()` and `ReadStream.open()` are internal Type: End-of-Life [`WriteStream.open()`][] and [`ReadStream.open()`][] are undocumented intern... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.055436357855796814,
0.006876128725707531,
-0.07477793842554092,
0.0032178862020373344,
0.06793516129255295,
-0.11756855994462967,
-0.06537669897079468,
0.09591393172740936,
0.034750621765851974,
0.07711835205554962,
-0.047229330986738205,
0.04998229816555977,
-0.10133446007966995,
0.005... | 0.105667 |
})` Type: End-of-Life The `fs.rmdir`, `fs.rmdirSync`, and `fs.promises.rmdir` methods used to support a `recursive` option. That option has been removed. Use `fs.rm(path, { recursive: true, force: true })`, `fs.rmSync(path, { recursive: true, force: true })` or `fs.promises.rm(path, { recursive: true, force: true })` i... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.05250243842601776,
-0.03330770879983902,
-0.020568961277604103,
-0.0007072336738929152,
0.135445699095726,
-0.08880884945392609,
-0.05662468820810318,
0.03288395702838898,
0.06787639111280441,
0.07443320751190186,
0.031781215220689774,
-0.000847353134304285,
-0.007447495125234127,
0.080... | 0.039995 |
compatible with `Uint8Array.prototype.slice()`, which is a superclass of `Buffer`. Use [`buffer.subarray`][] which does the same thing instead. ### DEP0159: `ERR\_INVALID\_CALLBACK` Type: End-of-Life This error code was removed due to adding more confusion to the errors used for value type validation. ### DEP0160: `pro... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.12105518579483032,
-0.003748927731066942,
-0.021133724600076675,
0.02524036169052124,
-0.011539087630808353,
-0.06825625896453857,
0.058175232261419296,
0.05271647125482559,
0.008146435022354126,
-0.042220231145620346,
-0.07726883143186569,
0.0068227509036660194,
-0.1442970186471939,
0.... | 0.091252 |
is bound to an `AsyncResource`. It no longer does. ### DEP0173: the `assert.CallTracker` class Type: End-of-Life The `assert.CallTracker` API has been removed. ### DEP0174: calling `promisify` on a function that returns a `Promise` Type: Runtime Calling [`util.promisify`][] on a function that returns a `Promise` will i... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.1351277232170105,
0.016398025676608086,
-0.0397271066904068,
0.05883782356977463,
0.052517205476760864,
-0.0666731745004654,
-0.03963592275977135,
0.05560234189033508,
0.01722487434744835,
-0.026786252856254578,
-0.041147567331790924,
-0.011877874843776226,
-0.07124554365873337,
0.08296... | 0.040966 |
guaranteed to be identical to that of `process.features.tls`. ### DEP0190: Passing `args` to `node:child\_process` `execFile`/`spawn` with `shell` option Type: Runtime When an `args` array is passed to [`child\_process.execFile`][] or [`child\_process.spawn`][] with the option `{ shell: true }` or `{ shell: '/path/to/s... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.09636041522026062,
0.023618703708052635,
-0.024669647216796875,
0.012497556395828724,
0.0335775762796402,
-0.08494587242603302,
0.04135974124073982,
0.046282414346933365,
-0.003997932653874159,
0.02878798171877861,
-0.0163839403539896,
-0.023219076916575432,
0.01499375980347395,
0.04137... | 0.062826 |
} ``` ### DEP0201: Passing `options.type` to `Duplex.toWeb()` Type: Runtime Passing the `type` option to [`Duplex.toWeb()`][] is deprecated. To specify the type of the readable half of the constructed readable-writable pair, use the `readableType` option instead. ### DEP0202: `Http1IncomingMessage` and `Http1ServerResp... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.04683418944478035,
0.01910221017897129,
0.020851997658610344,
0.012998836115002632,
-0.027030348777770996,
-0.06627897173166275,
-0.04829291254281998,
0.0765344649553299,
-0.015520839020609856,
-0.005567540414631367,
-0.016009287908673286,
-0.0002938132965937257,
-0.008285523392260075,
... | -0.035969 |
[`--unhandled-rejections`]: cli.md#--unhandled-rejectionsmode [`Buffer.allocUnsafeSlow(size)`]: buffer.md#static-method-bufferallocunsafeslowsize [`Buffer.from(array)`]: buffer.md#static-method-bufferfromarray [`Buffer.from(buffer)`]: buffer.md#static-method-bufferfrombuffer [`Buffer.isBuffer()`]: buffer.md#static-meth... | https://github.com/nodejs/node/blob/main/doc/api/deprecations.md | main | nodejs | [
-0.017610803246498108,
0.0497586764395237,
-0.08373772352933884,
0.014047401957213879,
0.019621720537543297,
-0.11247438937425613,
-0.005701948422938585,
-0.026916703209280968,
-0.02942240796983242,
-0.07821765542030334,
-0.06104087829589844,
-0.030779333785176277,
0.0481221079826355,
0.00... | -0.015305 |
# Debugger > Stability: 2 - Stable Node.js includes a command-line debugging utility. The Node.js debugger client is not a full-featured debugger, but simple stepping and inspection are possible. The debugger supports two modes of operation: [interactive mode][] and [non-interactive probe mode][]. ## Interactive mode `... | https://github.com/nodejs/node/blob/main/doc/api/debugger.md | main | nodejs | [
-0.041789598762989044,
-0.009157156571745872,
-0.01732054352760315,
0.07714952528476715,
0.1043735146522522,
-0.07225067913532257,
-0.07046244293451309,
0.0387694388628006,
-0.0016054017469286919,
0.06446363031864166,
-0.05281829088926315,
0.030060330405831337,
-0.05266460403800011,
-0.061... | 0.035272 |
loaded yet. debug> c break in mod.js:22 20 // USE OR OTHER DEALINGS IN THE SOFTWARE. 21 >22 exports.hello = function() { 23 return 'hello from module'; 24 }; debug> ``` It is also possible to set a conditional breakpoint that only breaks when a given expression evaluates to `true`: ```console $ node inspect main.js < D... | https://github.com/nodejs/node/blob/main/doc/api/debugger.md | main | nodejs | [
-0.06458734720945358,
0.010923543944954872,
0.06289763748645782,
0.042628705501556396,
0.10699385404586792,
-0.029065078124403954,
-0.0621439665555954,
0.027880292385816574,
-0.007135328371077776,
0.04047224670648575,
-0.003820557612925768,
-0.03716913238167763,
-0.058725424110889435,
-0.0... | 0.034594 |
provided expressions are evaluated and printed in the output. `<file>` matches the URL suffix of the script to probe. `<line>` and `<col>` numbers are 1-based. When `<col>` is omitted, the probe binds to the first executable column on the line. \* `--expr <expr>`: JavaScript expression to evaluate whenever execution re... | https://github.com/nodejs/node/blob/main/doc/api/debugger.md | main | nodejs | [
-0.05766160786151886,
0.06602049618959427,
-0.10166658461093903,
0.04817758500576019,
0.0330582819879055,
-0.12069261819124222,
-0.026505284011363983,
0.05265510454773903,
-0.0031035025604069233,
0.002731161192059517,
0.0242761317640543,
0.019558141008019447,
-0.0038253110833466053,
0.0149... | 0.193841 |
field. "suffix": "cli.js", "line": 5 } } ], "results": [ { "probe": 0, // Index into probes[]. "event": "hit", // Hit events are recorded in observation order. "hit": 1, // 1-based hit count for this probe. "location": { // The actual location where the execution is paused to evaluate // the expression of the probe. Th... | https://github.com/nodejs/node/blob/main/doc/api/debugger.md | main | nodejs | [
-0.023877859115600586,
0.0734243094921112,
0.03570688143372536,
0.08851882070302963,
0.05784960091114044,
-0.031119026243686676,
0.030427267774939537,
0.01895204931497574,
0.14127889275550842,
-0.017998579889535904,
-0.04033837467432022,
-0.02118891105055809,
0.011827308684587479,
0.075666... | 0.146674 |
Hit 1 at file:///path/to/app.js:4:1 x = {x: 42} Hit 1 at file:///path/to/app.js:4:1 y = {y: 35} Completed ``` ```console $ node inspect --probe app.js:4 --expr 'x' --probe app.js:4 --expr 'y' --json --preview -- app.js ``` Prints ```json {"v":2,"probes":[{"expr":"x","target":{"suffix":"app.js","line":4}},{"expr":"y","t... | https://github.com/nodejs/node/blob/main/doc/api/debugger.md | main | nodejs | [
0.00536750815808773,
0.06291075795888901,
-0.007982142269611359,
0.03432416915893555,
0.07839365303516388,
-0.05498279631137848,
-0.00669790618121624,
0.04135898873209953,
0.03986257687211037,
0.014437924139201641,
0.011121954768896103,
0.0027974406257271767,
-0.028685040771961212,
0.02832... | 0.073672 |
[non-interactive probe mode]: #probe-mode | https://github.com/nodejs/node/blob/main/doc/api/debugger.md | main | nodejs | [
-0.01829785481095314,
0.01707257330417633,
-0.014287617057561874,
0.06354929506778717,
0.04647373408079147,
-0.1001853346824646,
0.09456824511289597,
-0.045040350407361984,
-0.004996671807020903,
0.014748705551028252,
0.055013660341501236,
-0.04993405193090439,
0.006696708500385284,
0.0654... | 0.2309 |
# Zlib > Stability: 2 - Stable The `node:zlib` module provides compression functionality implemented using Gzip, Deflate/Inflate, Brotli, and Zstd. To access it: ```mjs import zlib from 'node:zlib'; ``` ```cjs const zlib = require('node:zlib'); ``` Compression and decompression are built around the Node.js [Streams API... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.14173524081707,
0.0875251442193985,
-0.05111975595355034,
0.045963410288095474,
0.06272871047258377,
-0.09471157193183899,
-0.04140746593475342,
0.07713542878627777,
-0.031037872657179832,
-0.01949729584157467,
-0.07904627174139023,
0.054640140384435654,
0.04338906705379486,
0.003210982... | 0.064209 |
``` ```cjs const zlib = require('node:zlib'); const payload = Buffer.from('This is some data'); // WARNING: DO NOT DO THIS! for (let i = 0; i < 30000; ++i) { zlib.deflate(payload, (err, buffer) => {}); } ``` In the preceding example, 30,000 deflate instances are created concurrently. Because of how some operating syste... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.11847256869077682,
0.08843641728162766,
-0.020766764879226685,
0.03808034956455231,
0.03647429496049881,
-0.13005518913269043,
0.0068558622151613235,
0.05776604264974594,
-0.017179515212774277,
-0.028706450015306473,
-0.06446849554777145,
0.07490702718496323,
-0.02576403133571148,
0.036... | 0.110292 |
error. response.end(); console.error('An error occurred:', err); } }; // Note: This is not a conformant accept-encoding parser. // See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3 if (/\bdeflate\b/.test(acceptEncoding)) { response.writeHead(200, { 'Content-Encoding': 'deflate' }); pipeline(raw, zlib.... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.10471636056900024,
0.0648147314786911,
-0.054018206894397736,
0.01077140774577856,
0.023320604115724564,
-0.10371693968772888,
-0.0436951145529747,
0.020146265625953674,
-0.04104470834136009,
-0.005231879185885191,
-0.0321153849363327,
-0.0652201697230339,
0.009231211617588997,
0.079771... | -0.00535 |
{ windowBits: 14, memLevel: 7 }; ``` This will, however, generally degrade compression. The memory requirements for inflate are (in bytes) `1 << windowBits`. That is, 32K for `windowBits` = 15 (default value) plus a few kilobytes for small objects. This is in addition to a single internal output slab buffer of size `ch... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.02853589504957199,
0.07622164487838745,
-0.004294889513403177,
0.03671467676758766,
0.07246385514736176,
-0.0915115624666214,
-0.06395517289638519,
0.08247406780719757,
0.06474923342466354,
-0.0398014634847641,
-0.09135685116052628,
0.03332669287919998,
-0.03956453502178192,
-0.00897101... | 0.070295 |
of data has already been sent to the client. // The best we can do is terminate the response immediately // and log the error. clearInterval(i); response.end(); console.error('An error occurred:', err); } }); i = setInterval(() => { output.write(`The current time is ${Date()}\n`, () => { // The data has been passed to ... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.05761044844985008,
0.13594356179237366,
-0.0356050468981266,
0.0788969099521637,
-0.009566579014062881,
-0.08864890784025192,
-0.041216377168893814,
0.009637495502829552,
0.012508364394307137,
-0.028416786342859268,
-0.051439493894577026,
0.02963208220899105,
0.03720963001251221,
-0.043... | 0.055091 |
affects internal memory allocation patterns. \* `BROTLI\_DECODER\_PARAM\_LARGE\_WINDOW` \* Boolean flag enabling “Large Window Brotli” mode (not compatible with the Brotli format as standardized in [RFC 7932][]). ### Zstd constants > Stability: 1 - Experimental There are several options and other constants available fo... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.11595827341079712,
0.08263534307479858,
-0.07550625503063202,
0.035417649894952774,
0.015477629378437996,
-0.0912640243768692,
-0.044450417160987854,
-0.004701120778918266,
-0.0449298620223999,
-0.067352294921875,
-0.03627011552453041,
0.04106910526752472,
0.027371278032660484,
-0.01969... | -0.019722 |
`zlib.InflateRaw` \* Extends: [`ZlibBase`][] Decompress a raw deflate stream. ## Class: `zlib.Unzip` \* Extends: [`ZlibBase`][] Decompress either a Gzip- or Deflate-compressed stream by auto-detecting the header. ## Class: `zlib.ZlibBase` \* Extends: [`stream.Transform`][] Not exported by the `node:zlib` module. It is ... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.17177416384220123,
0.08305322378873825,
-0.035826221108436584,
0.066218301653862,
0.08654499053955078,
-0.1294291466474533,
-0.021005598828196526,
0.04302547127008438,
-0.06046256050467491,
-0.0756029561161995,
-0.04971526190638542,
0.04806990176439285,
0.040161605924367905,
0.008548127... | 0.074735 |
compute the checksum on a string based on `str.charCodeAt()` so that it can be run in browsers. If users want to match the checksum computed with this kind of library in the browser, it's better to use the same library in Node.js if it also runs in Node.js. If users have to use `zlib.crc32()` to match the checksum prod... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.0013396331341937184,
0.05038012936711311,
-0.10113117843866348,
-0.005832743365317583,
0.03343271091580391,
-0.08129921555519104,
0.05025125667452812,
0.01893690600991249,
-0.01202383916825056,
-0.053716398775577545,
-0.052117228507995605,
-0.006582054775208235,
0.06157086417078972,
0.0... | -0.019489 |
options], callback)` \* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string} \* `options` {zlib options} \* `callback` {Function} ### `zlib.deflateSync(buffer[, options])` \* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string} \* `options` {zlib options} Compress a chunk of data with [`Deflate`][]. ### `zlib.d... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.08264687657356262,
0.008348832838237286,
-0.08518379926681519,
0.022857142612338066,
-0.07533048838376999,
-0.11036387085914612,
0.09345165640115738,
0.03205933794379234,
-0.06508183479309082,
-0.08371254801750183,
-0.06461403518915176,
0.007289796136319637,
-0.02858296036720276,
0.0203... | 0.041669 |
= pullSync(fromSync('hello'), compressGzipSync()); const original = textSync(pullSync(compressed, decompressGzipSync())); console.log(original); // 'hello' ``` ```cjs const { fromSync, pullSync, textSync } = require('node:stream/iter'); const { compressGzipSync, decompressGzipSync } = require('node:zlib/iter'); const c... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.11137306690216064,
0.07558024674654007,
-0.07826649397611618,
0.046216219663619995,
-0.005197145976126194,
-0.05545682832598686,
-0.03100920282304287,
0.056834954768419266,
0.011898440308868885,
-0.038767654448747635,
-0.058885447680950165,
-0.001130248885601759,
-0.04602901637554169,
0... | 0.040439 |
`chunkSize` {number} Output buffer size. \*\*Default:\*\* `65536` (64 KB). \* `windowBits` {number} \*\*Default:\*\* `Z\_DEFAULT\_WINDOWBITS` (15). \* `dictionary` {Buffer|TypedArray|DataView} \* Returns: {Object} A stateful transform. Create a gzip decompression transform. ### `decompressZstd([options])` ### `decompre... | https://github.com/nodejs/node/blob/main/doc/api/zlib.md | main | nodejs | [
-0.07988069206476212,
0.08475998044013977,
-0.09783276915550232,
0.0017532759811729193,
-0.04569394886493683,
-0.10614484548568726,
0.002563469810411334,
0.015225652605295181,
-0.06176329031586647,
0.006436905823647976,
-0.08482633531093597,
0.021945476531982422,
-0.014460572972893715,
0.0... | 0.030906 |
# Cluster > Stability: 2 - Stable Clusters of Node.js processes can be used to run multiple instances of Node.js that can distribute workloads among their application threads. When process isolation is not needed, use the [`worker\_threads`][] module instead, which allows running multiple application threads within a s... | https://github.com/nodejs/node/blob/main/doc/api/cluster.md | main | nodejs | [
-0.06094501540064812,
-0.043891023844480515,
-0.032970279455184937,
0.015375296585261822,
0.029345309361815453,
-0.06590024381875992,
-0.0690661370754242,
0.02837207540869713,
0.007732630241662264,
0.026081427931785583,
-0.034200746566057205,
0.028765570372343063,
0.00537990452721715,
-0.0... | 0.163157 |
the same "random" port each time they do `listen(0)`. In essence, the port is random the first time, but predictable thereafter. To listen on a unique port, generate a port number based on the cluster worker ID. Node.js does not provide routing logic. It is therefore important to design an application such that it does... | https://github.com/nodejs/node/blob/main/doc/api/cluster.md | main | nodejs | [
-0.04673987627029419,
-0.02461966872215271,
-0.0017518048407509923,
0.05569029971957207,
0.023059142753481865,
-0.030125098302960396,
0.007976812310516834,
-0.08418913930654526,
0.05414443463087082,
-0.007560721132904291,
-0.03774499520659447,
0.12969578802585602,
-0.0018546214560046792,
-... | 0.156796 |
// Start workers and listen for messages containing notifyRequest const numCPUs = availableParallelism(); for (let i = 0; i < numCPUs; i++) { cluster.fork(); } for (const id in cluster.workers) { cluster.workers[id].on('message', messageHandler); } } else { // Worker processes have a http server. http.Server((req, res)... | https://github.com/nodejs/node/blob/main/doc/api/cluster.md | main | nodejs | [
-0.041873447597026825,
0.032933544367551804,
-0.0037118198815733194,
0.04369352012872696,
0.024847501888871193,
-0.08391205966472626,
0.025316378101706505,
-0.02041371539235115,
0.05249617621302605,
0.01985011249780655,
-0.054849691689014435,
-0.05641293153166771,
-0.03131093084812164,
-0.... | 0.209281 |
was just voluntary – no need to worry'); } }); // kill worker worker.kill(); ``` ### `worker.id` \* Type: {integer} Each new worker is given its own unique id, this id is stored in the `id`. While a worker is alive, this is the key that indexes it in `cluster.workers`. ### `worker.isConnected()` This function returns `... | https://github.com/nodejs/node/blob/main/doc/api/cluster.md | main | nodejs | [
-0.054569061845541,
0.0208212248980999,
-0.027210133150219917,
0.07947654277086258,
0.07917969673871994,
-0.07961101084947586,
0.01852613128721714,
-0.04794478043913841,
0.010438003577291965,
0.028906788676977158,
-0.02026274800300598,
0.06852353364229202,
0.0003823580627795309,
-0.0175886... | 0.222568 |
the primary. It is identical to `process.send()`. This example will echo back all messages from the primary: ```js if (cluster.isPrimary) { const worker = cluster.fork(); worker.send('hi there'); } else if (cluster.isWorker) { process.on('message', (msg) => { process.send(msg); }); } ``` ## Event: `'disconnect'` \* `wo... | https://github.com/nodejs/node/blob/main/doc/api/cluster.md | main | nodejs | [
-0.040423013269901276,
-0.013277597725391388,
-0.004683197941631079,
0.09934060275554657,
0.1299900859594345,
-0.06716256588697433,
0.03766513615846634,
-0.00999330636113882,
0.09584153443574905,
0.006673350464552641,
-0.029910983517766,
0.051729269325733185,
-0.07336632907390594,
-0.02263... | 0.227662 |
closed. Calls `.disconnect()` on each worker in `cluster.workers`. When they are disconnected all internal handles will be closed, allowing the primary process to die gracefully if no other event is waiting. The method takes an optional callback argument which will be called when finished. This can only be called from ... | https://github.com/nodejs/node/blob/main/doc/api/cluster.md | main | nodejs | [
-0.03893492370843887,
-0.0220780149102211,
-0.03983214870095253,
0.059428051114082336,
0.06315433233976364,
-0.07186950743198395,
-0.01040280144661665,
0.026874739676713943,
0.011108899489045143,
0.058373890817165375,
-0.049692414700984955,
0.005909659434109926,
-0.0272771455347538,
-0.025... | 0.174994 |
defaults for later calls are the current values at the time of `cluster.setupPrimary()` is called. ```mjs import cluster from 'node:cluster'; cluster.setupPrimary({ exec: 'worker.js', args: ['--use', 'https'], silent: true, }); cluster.fork(); // https worker cluster.setupPrimary({ exec: 'worker.js', args: ['--use', 'h... | https://github.com/nodejs/node/blob/main/doc/api/cluster.md | main | nodejs | [
-0.02340729348361492,
0.07267487049102783,
-0.046386778354644775,
0.05047560855746269,
-0.013979530893266201,
-0.05822952464222908,
-0.056623734533786774,
0.03073648363351822,
0.00865920539945364,
-0.021989157423377037,
0.00907474011182785,
-0.017768828198313713,
-0.03543867915868759,
-0.0... | 0.105564 |
# V8 The `node:v8` module exposes APIs that are specific to the version of [V8][] built into the Node.js binary. It can be accessed using: ```mjs import v8 from 'node:v8'; ``` ```cjs const v8 = require('node:v8'); ``` ## `v8.cachedDataVersionTag()` \* Returns: {integer} Returns an integer representing a version tag der... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.01427454873919487,
0.0024481150321662426,
-0.009356596507132053,
0.02371092140674591,
0.09149491041898727,
-0.03126636520028114,
-0.04657551646232605,
-0.0168913621455431,
-0.034773558378219604,
-0.055567417293787,
-0.04972729831933975,
-0.009350868873298168,
-0.11099175363779068,
-0.05... | 0.060243 |
\* `number\_of\_native\_contexts` {number} \* `number\_of\_detached\_contexts` {number} \* `total\_global\_handles\_size` {number} \* `used\_global\_handles\_size` {number} \* `external\_memory` {number} \* `total\_allocated\_bytes` {number} `total\_heap\_size` The value of total\\_heap\\_size is the number of bytes V8... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.004709738772362471,
-0.0012927199713885784,
-0.04735616222023964,
-0.010690862312912941,
-0.007948511280119419,
-0.020708348602056503,
0.07378020882606506,
0.11026805639266968,
0.023113999515771866,
-0.04281184449791908,
-0.010074927471578121,
-0.0496084988117218,
0.06822843104600906,
-... | 0.163189 |
used\_size\_bytes: 152, space\_statistics: [ { name: 'NormalPageSpace0', committed\_size\_bytes: 0, resident\_size\_bytes: 0, used\_size\_bytes: 0, page\_stats: [{}], free\_list\_stats: {}, }, { name: 'NormalPageSpace1', committed\_size\_bytes: 131072, resident\_size\_bytes: 131072, used\_size\_bytes: 152, page\_stats:... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.03247468173503876,
0.007553732953965664,
-0.06155391037464142,
-0.012148905545473099,
0.04655841365456581,
-0.054115984588861465,
0.05782366544008255,
-0.005939023569226265,
0.005733693949878216,
0.07242978364229202,
0.07746247947216034,
-0.05148379132151604,
0.07656972855329514,
-0.016... | 0.091166 |
prototype chain of the child // classes's prototype, so the child classes's prototype would also be // included in the result. console.log(queryObjects(A)); // 3 // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ] console.log(queryObjects(A, { format: 'summary' })); ``` ## `v8.setFlagsFromString(flags)` \... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.07707211375236511,
0.07663305848836899,
-0.006007491610944271,
0.06180400773882866,
-0.06235113739967346,
0.03085506521165371,
-0.016071373596787453,
0.058404695242643356,
-0.028921067714691162,
-0.024750536307692528,
-0.05684307590126991,
-0.0016293220687657595,
-0.044618573039770126,
... | 0.033254 |
file. This file is intended to be used with tools such as Chrome DevTools. The JSON schema is undocumented and specific to the V8 engine, and may change from one version of V8 to the next. A heap snapshot is specific to a single V8 isolate. When using [worker threads][], a heap snapshot generated from the main thread w... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.12731324136257172,
0.07315299659967422,
-0.03551393747329712,
0.0032025391701608896,
0.07350426912307739,
-0.10073801875114441,
-0.07895612716674805,
0.04707767441868782,
0.04622969031333923,
-0.0516069121658802,
-0.019551603123545647,
0.060344867408275604,
-0.05557560920715332,
-0.0826... | 0.176292 |
Pass the corresponding `ArrayBuffer` in the deserializing context to [`deserializer.transferArrayBuffer()`][]. #### `serializer.writeUint32(value)` \* `value` {integer} Write a raw 32-bit unsigned integer. For use inside of a custom [`serializer.\_writeHostObject()`][]. #### `serializer.writeUint64(hi, lo)` \* `hi` {in... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
0.034178365021944046,
0.05041633918881416,
-0.031189516186714172,
-0.03537757322192192,
-0.09602027386426926,
-0.03482355922460556,
0.035711269825696945,
0.060537487268447876,
-0.06602239608764648,
-0.06375691294670105,
-0.10754141211509705,
-0.03347652032971382,
-0.04685556888580322,
0.02... | 0.070039 |
to read some kind of host object, i.e. an object that is created by native C++ bindings. If it is not possible to deserialize the data, a suitable exception should be thrown. This method is not present on the `Deserializer` class itself but can be provided by subclasses. ### Class: `v8.DefaultSerializer` A subclass of ... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.04061088338494301,
0.047561533749103546,
-0.01845511794090271,
0.023098649457097054,
-0.0648888498544693,
-0.060214269906282425,
-0.022846590727567673,
-0.001187903922982514,
-0.018672959879040718,
-0.060973722487688065,
-0.08218080550432205,
-0.032377760857343674,
-0.08188237994909286,
... | 0.115727 |
}); } // The `before` event runs immediately before a `then()` or `catch()` handler // runs or an `await` resumes execution. function before(promise) { console.log('a promise is about to call a then handler', { promise }); } // The `after` event runs immediately after a `then()` handler runs or when // an `await` begin... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.05821431800723076,
-0.012848874554038048,
0.03619757294654846,
0.040589481592178345,
0.07190315425395966,
0.025926603004336357,
-0.03609076142311096,
0.005943662486970425,
0.0968896821141243,
0.0062906802631914616,
-0.00876969750970602,
0.032725002616643906,
-0.07813616842031479,
-0.007... | 0.053889 |
callback needs to be passed. The specifics of all functions that can be passed to `callbacks` is in the [Hook Callbacks][] section. ```mjs import { promiseHooks } from 'node:v8'; const stopAll = promiseHooks.createHook({ init(promise, parent) {}, }); ``` ```cjs const { promiseHooks } = require('node:v8'); const stopAll... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.16324499249458313,
0.045639075338840485,
-0.0028375813271850348,
0.07713457942008972,
0.043603911995887756,
-0.04652097821235657,
-0.07676734030246735,
0.0573413111269474,
0.08611990511417389,
-0.03768571838736534,
-0.07516184449195862,
0.024766696617007256,
-0.04427313804626465,
-0.066... | 0.099644 |
of files from directory and store them into storage. constructor(directory, books) { for (const book of books) { this.storage.set(book, fs.readFileSync(path.join(directory, book))); } } static compressAll(shelf) { for (const [ book, content ] of shelf.storage) { shelf.storage.set(book, zlib.gzipSync(content)); } } stat... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.12036517262458801,
0.07886701077222824,
-0.09816291183233261,
0.07467573136091232,
0.009786535985767841,
-0.0676601380109787,
-0.02734755538403988,
0.08511034399271011,
-0.013825210742652416,
0.02091185562312603,
-0.0006408279296010733,
0.06852547079324722,
0.10237908363342285,
0.002406... | -0.036845 |
return an object. The content of object is as follows. ```json { "version": 1, "startTime": 1674059033862, "statistics": [ { "gcType": "Scavenge", "beforeGC": { "heapStatistics": { "totalHeapSize": 5005312, "totalHeapSizeExecutable": 524288, "totalPhysicalSize": 5226496, "totalAvailableSize": 4341325216, "totalGlobalHa... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.017570246011018753,
0.07817970961332321,
-0.0307515487074852,
0.032525986433029175,
-0.05599038302898407,
-0.07677317410707474,
-0.03687628358602524,
0.06803832203149796,
0.0024871418718248606,
0.01135203056037426,
-0.0421086847782135,
-0.049224402755498886,
-0.06806530058383942,
0.0233... | 0.069983 |
discarded. \*\*Default:\*\* `4294967295`. \* Returns: {SyncCPUProfileHandle} Starting a CPU profile then return a `SyncCPUProfileHandle` object. This API supports `using` syntax. ```cjs const handle = v8.startCpuProfile({ sampleInterval: 1, maxBufferSize: 10\_000 }); const profile = handle.stop(); console.log(profile);... | https://github.com/nodejs/node/blob/main/doc/api/v8.md | main | nodejs | [
-0.0656399354338646,
0.009006711654365063,
-0.08820613473653793,
0.036619823426008224,
-0.03483712300658226,
-0.096879743039608,
-0.0019554917234927416,
0.11467907577753067,
-0.04585554450750351,
-0.06784810870885849,
-0.0879397839307785,
-0.04512406513094902,
-0.04687860980629921,
-0.0756... | 0.07168 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.