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 |
|---|---|---|---|---|---|
an optional `options` object. If no `options` object is specified, it will default with the above values. #### `filehandle.write(string[, position[, encoding]])` \* `string` {string} \* `position` {integer|null} The offset from the beginning of the file where the data from `string` should be written. If `position` is n... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.05992501601576805,
0.03294159471988678,
-0.015843331813812256,
0.02771618776023388,
-0.11301233619451523,
-0.05606367066502571,
0.040392205119132996,
0.08667376637458801,
0.05983186140656471,
0.03161636367440224,
-0.027268050238490105,
0.08163552731275558,
0.01886012963950634,
-0.046814... | 0.010776 |
Maximum chunk size in bytes for synchronous write operations. Writes larger than this threshold fall back to async I/O. Set this to match the reader's `chunkSize` for optimal `pipeTo()` performance. \*\*Default:\*\* `131072` (128 KB). \* Returns: {Object} \* `write(chunk[, options])` {Function} Returns {Promise}. Accep... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.04350142180919647,
-0.0031464502681046724,
0.029305290430784225,
0.021387889981269836,
-0.05865716561675072,
-0.1614999622106552,
-0.016958000138401985,
0.04334937408566475,
0.010022121481597424,
0.017481382936239243,
-0.09210587292909622,
0.033360555768013,
-0.09567511826753616,
-0.031... | 0.090256 |
await w.end(); await dst.close(); } run().catch(console.error); ``` #### `filehandle[Symbol.asyncDispose]()` Calls `filehandle.close()` and returns a promise that fulfills when the filehandle is closed. ### `fsPromises.access(path[, mode])` \* `path` {string|Buffer|URL} \* `mode` {integer} \*\*Default:\*\* `fs.constant... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.057780921459198,
0.02322961576282978,
-0.05178012698888779,
0.10602918267250061,
0.04736946150660515,
-0.08709133416414261,
0.008418291807174683,
0.12917450070381165,
0.017348449677228928,
-0.025727208703756332,
-0.03762360289692879,
0.051648981869220734,
-0.12317826598882675,
0.0139625... | 0.072587 |
If an error occurs after the destination file has been opened for writing, an attempt will be made to remove the destination. ```mjs import { copyFile, constants } from 'node:fs/promises'; try { await copyFile('source.txt', 'destination.txt'); console.log('source.txt was copied to destination.txt'); } catch { console.e... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.08253823965787888,
0.0027171403635293245,
0.013246783055365086,
0.07877110689878464,
0.09804663062095642,
-0.054808661341667175,
0.004266953561455011,
0.06715857237577438,
0.074033722281456,
0.0190926231443882,
0.016108935698866844,
0.0013832797994837165,
-0.004506082274019718,
-0.01213... | 0.11239 |
\* Returns: {Promise} Fulfills with `undefined` upon success. Changes the ownership on a symbolic link. ### `fsPromises.lutimes(path, atime, mtime)` \* `path` {string|Buffer|URL} \* `atime` {number|string|Date} \* `mtime` {number|string|Date} \* Returns: {Promise} Fulfills with `undefined` upon success. Changes the acc... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.0942125990986824,
0.01471356675028801,
0.009381779469549656,
0.057928118854761124,
0.04103458672761917,
-0.05672699213027954,
0.015399266965687275,
0.1334390938282013,
0.052734073251485825,
-0.01537790335714817,
0.013967500068247318,
0.02980528585612774,
-0.056346457451581955,
0.0090414... | 0.075064 |
`fsPromises.mkdtempDisposable(prefix[, options])` \* `prefix` {string|Buffer|URL} \* `options` {string|Object} \* `encoding` {string} \*\*Default:\*\* `'utf8'` \* Returns: {Promise} Fulfills with a Promise for an async-disposable Object: \* `path` {string} The path of the created directory. \* `remove` {AsyncFunction} ... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.10114360600709915,
0.03384699672460556,
-0.043074771761894226,
0.12196676433086395,
0.0003809648042079061,
-0.08881143480539322,
0.0005340691423043609,
0.006755431182682514,
0.11436904221773148,
-0.036196235567331314,
0.07659246027469635,
0.08128532022237778,
-0.047926098108291626,
0.02... | 0.100325 |
be passed as {Buffer} objects. If `options.withFileTypes` is set to `true`, the returned array will contain {fs.Dirent} objects. ```mjs import { readdir } from 'node:fs/promises'; try { const files = await readdir(path); for (const file of files) console.log(file); } catch (err) { console.error(err); } ``` ### `fsPromi... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.04390621557831764,
0.05226832255721092,
-0.05041602626442909,
0.05335266888141632,
0.04490518197417259,
-0.03169247880578041,
0.04291056469082832,
0.18289275467395782,
0.01837301254272461,
0.010715030133724213,
-0.050456125289201736,
0.037307679653167725,
-0.05587676167488098,
0.0227245... | 0.090647 |
a {Buffer} object. On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on `/proc` in order for this function to work. Glibc does not have this restriction. ### `fsPromises.rename(oldPath, newPath)` \* `oldPath` {string|Buffer|URL} \* `newPath` {string|Buffer|URL} \* Returns: {Prom... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.07293213903903961,
-0.051312319934368134,
-0.05812959745526314,
-0.025556277483701706,
0.09954186528921127,
-0.0767350122332573,
-0.006780772935599089,
0.13278037309646606,
0.05815770477056503,
-0.01097798254340887,
0.04057185351848602,
0.04902292415499687,
-0.048464298248291016,
0.0696... | 0.056804 |
`path` refers to a symbolic link, then the link is removed without affecting the file or directory to which that link refers. If the `path` refers to a file path that is not a symbolic link, the file is deleted. See the POSIX unlink(2) documentation for more detail. ### `fsPromises.utimes(path, atime, mtime)` \* `path`... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.08472823351621628,
0.04224051535129547,
-0.009111547842621803,
0.05830955505371094,
0.06160477176308632,
-0.07676005363464355,
-0.010313855484127998,
0.0872708261013031,
0.09303831309080124,
-0.022542163729667664,
0.01796090416610241,
0.03652062639594078,
-0.030775459483265877,
0.023599... | 0.103362 |
specifies the encoding. The `mode` option only affects the newly created file. See [`fs.open()`][] for more details. Any specified {FileHandle} has to support writing. It is unsafe to use `fsPromises.writeFile()` multiple times on the same file without waiting for the promise to be settled. Similarly to `fsPromises.rea... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.028398556634783745,
0.03781292214989662,
-0.06321746110916138,
0.07435805350542068,
0.040436286479234695,
-0.05910038203001022,
0.02931140549480915,
0.14058373868465424,
0.06523440778255463,
0.01798681542277336,
-0.04773854836821556,
0.10476651787757874,
-0.03911185637116432,
-0.0505456... | 0.088945 |
the two calls. Instead, user code should open/read/write the file directly and handle the error raised if the file is not accessible. \*\*write (NOT RECOMMENDED)\*\* ```mjs import { access, open, close } from 'node:fs'; access('myfile', (err) => { if (!err) { console.error('myfile already exists'); return; } open('myfi... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.02688235230743885,
0.037757452577352524,
0.014253473840653896,
0.04216676577925682,
0.07055430114269257,
-0.06553769111633301,
0.019701847806572914,
0.13287916779518127,
0.0197379682213068,
0.05099789425730705,
-0.014760279096662998,
0.0412883386015892,
0.06283031404018402,
-0.080295234... | 0.072532 |
{ if (err) throw err; try { appendFile(fd, 'data to append', 'utf8', (err) => { closeFd(fd); if (err) throw err; }); } catch (err) { closeFd(fd); throw err; } }); ``` ### `fs.chmod(path, mode, callback)` \* `path` {string|Buffer|URL} \* `mode` {string|integer} \* `callback` {Function} \* `err` {Error} Asynchronously ch... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.017757562920451164,
0.07126457989215851,
-0.0398174412548542,
0.013850100338459015,
0.06699689477682114,
-0.09580313414335251,
0.04595748335123062,
0.09595148265361786,
0.011324490420520306,
0.01153572741895914,
0.03953687846660614,
0.03882945328950882,
0.0002678051241673529,
0.00458135... | 0.068445 |
callback)` \* `src` {string|Buffer|URL} source filename to copy \* `dest` {string|Buffer|URL} destination filename of the copy operation \* `mode` {integer} modifiers for copy operation. \*\*Default:\*\* `0`. \* `callback` {Function} \* `err` {Error} Asynchronously copies `src` to `dest`. By default, `dest` is overwrit... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.12293731421232224,
0.0029727036599069834,
-0.002392630325630307,
0.07747319340705872,
0.041473306715488434,
-0.05639847740530968,
0.012371610850095749,
0.031371716409921646,
0.08997779339551926,
-0.0061333561316132545,
-0.010812859982252121,
0.06790093332529068,
-0.011294896714389324,
-... | 0.119382 |
Returns: {fs.ReadStream} `options` can include `start` and `end` values to read a range of bytes from the file instead of the entire file. Both `start` and `end` are inclusive and start counting at 0, allowed values are in the \[0, [`Number.MAX\_SAFE\_INTEGER`][]] range. If `fd` is specified and `start` is omitted or `... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.02632019855082035,
-0.019024429842829704,
-0.0931108370423317,
-0.009206796996295452,
-0.006516074296087027,
-0.023342609405517578,
-0.017119791358709335,
0.0745585635304451,
0.07804098725318909,
0.021288329735398293,
-0.04616003856062889,
0.09973186999559402,
-0.07352668046951294,
-0.0... | 0.122098 |
`w`. The `encoding` can be any one of those accepted by {Buffer}. If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, then the file descriptor won't be closed, even if there's an error. It is the application's responsibil... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.01807837188243866,
0.012514970265328884,
-0.06499278545379639,
0.0514138787984848,
0.028273046016693115,
-0.026623036712408066,
-0.005405441392213106,
0.029593894258141518,
0.07760360836982727,
0.03247576951980591,
-0.05109233781695366,
0.019255610182881355,
-0.05646587908267975,
0.0258... | 0.111716 |
=> { if (err) throw err; }); } }); } else { console.error('myfile does not exist'); } }); ``` \*\*read (RECOMMENDED)\*\* ```mjs import { open, close } from 'node:fs'; open('myfile', 'r', (err, fd) => { if (err) { if (err.code === 'ENOENT') { console.error('myfile does not exist'); return; } throw err; } try { readMyDat... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.047919224947690964,
0.016009235754609108,
-0.01792730577290058,
-0.008039884269237518,
0.10947059094905853,
-0.04482680931687355,
0.016431285068392754,
0.1279841661453247,
0.006532794795930386,
0.0388697050511837,
-0.004123416729271412,
0.017170464619994164,
0.04776564612984657,
-0.0219... | 0.106113 |
used. ### `fs.futimes(fd, atime, mtime, callback)` \* `fd` {integer} \* `atime` {number|string|Date} \* `mtime` {number|string|Date} \* `callback` {Function} \* `err` {Error} Change the file system timestamps of the object referenced by the supplied file descriptor. See [`fs.utimes()`][]. ### `fs.glob(pattern[, options... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.07996141910552979,
0.10004296898841858,
-0.037972256541252136,
0.036634061485528946,
0.045758653432130814,
-0.07388439029455185,
0.03727191314101219,
0.10879138857126236,
0.05218930169939995,
-0.011829257011413574,
-0.0155894560739398,
0.025562552735209465,
-0.03173140436410904,
0.00234... | 0.084103 |
a directory is created with `recursive` set to `true`. Asynchronously creates a directory. The callback is given a possible exception and, if `recursive` is `true`, the first directory path created, `(err[, path])`. `path` can still be `undefined` when `recursive` is `true`, if no directory was created (for instance, i... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.09827203303575516,
0.00011490247561596334,
-0.028235051780939102,
0.0652114599943161,
0.03389614820480347,
-0.1364898681640625,
-0.011467463336884975,
0.08954934030771255,
0.06584610790014267,
-0.008698311634361744,
0.10033879429101944,
-0.0015129901003092527,
0.025616806000471115,
0.03... | 0.115592 |
sets the file mode (permission and sticky bits), but only if the file was created. On Windows, only the write permission can be manipulated; see [`fs.chmod()`][]. The callback gets two arguments `(err, fd)`. Some characters (`< > : " / \ | ? \*`) are reserved under Windows as documented by [Naming Files, Paths, and Nam... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.012575151398777962,
0.010375762358307838,
-0.08225089311599731,
0.09277105331420898,
0.09482991695404053,
-0.055364735424518585,
0.0011971346102654934,
0.09209445118904114,
0.05598968267440796,
0.02170492708683014,
-0.06704024970531464,
0.08859561383724213,
-0.03734641894698143,
0.02533... | 0.091155 |
be set to the actual number of bytes read. \* If the file encounters EOF (End of File) before the buffer could be filled, Node.js will read all available bytes until EOF is encountered, and the `bytesRead` parameter in the callback will indicate the actual number of bytes read, which may be less than the specified `len... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
0.005865985993295908,
0.034659840166568756,
-0.04267312213778496,
0.035765111446380615,
0.031567905098199844,
-0.08097612112760544,
-0.0026670631486922503,
0.1579379141330719,
0.07373570650815964,
0.041971355676651,
-0.07383546233177185,
0.10654398053884506,
-0.08509742468595505,
-0.051118... | 0.086775 |
returned. If `options` is a string, then it specifies the encoding: ```mjs import { readFile } from 'node:fs'; readFile('/etc/passwd', 'utf8', callback); ``` When the path is a directory, the behavior of `fs.readFile()` and [`fs.readFileSync()`][] is platform-specific. On macOS, Linux, and Windows, an error will be ret... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.07827956974506378,
0.07088243216276169,
-0.07130484282970428,
0.024029100313782692,
0.09733974188566208,
-0.0608169324696064,
0.013081913813948631,
0.08165618032217026,
0.08076474070549011,
0.04189157113432884,
0.026203161105513573,
0.06641624122858047,
0.01308531779795885,
-0.058782286... | 0.051086 |
callback)` \* `fd` {integer} \* `buffers` {ArrayBufferView\[]} \* `position` {integer|null} \*\*Default:\*\* `null` \* `callback` {Function} \* `err` {Error} \* `bytesRead` {integer} \* `buffers` {ArrayBufferView\[]} Read from a file specified by `fd` and write to an array of `ArrayBufferView`s using `readv()`. `positi... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.011960401199758053,
0.03817536681890488,
-0.0777367502450943,
-0.007449542172253132,
-0.09309593588113785,
-0.05348099023103714,
0.08303461968898773,
0.07943443953990936,
0.01902652531862259,
-0.03003741428256035,
-0.06581083685159683,
0.08731000125408173,
-0.017369776964187622,
-0.0116... | 0.100883 |
`maxBusyTries`, and `emfileWait` but they were deprecated and removed. The `options` argument is still accepted for backwards compatibility but it is not used. \* `callback` {Function} \* `err` {Error} Asynchronous rmdir(2). No arguments other than a possible exception are given to the completion callback. Using `fs.rm... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.07816319912672043,
-0.02796538732945919,
-0.049607038497924805,
0.004101117607206106,
0.04133561998605728,
-0.15155214071273804,
0.04347481578588486,
0.09081270545721054,
0.05720611289143562,
-0.04044846072793007,
0.04960126429796219,
0.06418757885694504,
0.0037280514370650053,
0.039331... | 0.071842 |
### `fs.statfs(path[, options], callback)` \* `path` {string|Buffer|URL} \* `options` {Object} \* `bigint` {boolean} Whether the numeric values in the returned {fs.StatFs} object should be `bigint`. \*\*Default:\*\* `false`. \* `callback` {Function} \* `err` {Error} \* `stats` {fs.StatFs} Asynchronous statfs(2). Return... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.0364285409450531,
0.021149752661585808,
-0.08349959552288055,
0.061715710908174515,
0.062351882457733154,
-0.07541469484567642,
0.004976579453796148,
0.13094565272331238,
0.04114525392651558,
0.012252512387931347,
0.004007430747151375,
0.04826250672340393,
-0.0034199741203337908,
0.0123... | 0.105905 |
`fs.utimes(path, atime, mtime, callback)` \* `path` {string|Buffer|URL} \* `atime` {number|string|Date} \* `mtime` {number|string|Date} \* `callback` {Function} \* `err` {Error} Change the file system timestamps of the object referenced by `path`. The `atime` and `mtime` arguments follow these rules: \* Values can be e... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.07838485389947891,
0.03284216672182083,
-0.06382429599761963,
0.05030784010887146,
0.02449975721538067,
-0.054056160151958466,
0.022577444091439247,
0.12406042963266373,
0.06014152988791466,
-0.011953080072999,
-0.06750230491161346,
0.026302842423319817,
-0.006300829816609621,
-0.000096... | 0.080439 |
to function and may throw an exception. For example, watching files or directories can be unreliable, and in some cases impossible, on network file systems (NFS, SMB, etc) or host file systems when using virtualization software such as Vagrant or Docker. It is still possible to use `fs.watchFile()`, which uses stat pol... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.06419842690229416,
-0.031538449227809906,
-0.04160061851143837,
0.015134106390178204,
0.17152714729309082,
-0.010074639692902565,
0.02274835854768753,
0.017933344468474388,
0.20487657189369202,
0.029651574790477753,
0.00638531194999814,
0.10267672687768936,
-0.03661422058939934,
-0.1049... | 0.202982 |
\* the file is renamed and then renamed a second time back to its original name ### `fs.write(fd, buffer, offset[, length[, position]], callback)` \* `fd` {integer} \* `buffer` {Buffer|TypedArray|DataView} \* `offset` {integer} \*\*Default:\*\* `0` \* `length` {integer} \*\*Default:\*\* `buffer.byteLength - offset` \* ... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.02363758534193039,
0.03380518779158592,
-0.024572713300585747,
-0.021207021549344063,
-0.06986930966377258,
-0.06661121547222137,
0.07962215691804886,
0.09054132550954819,
0.07197228074073792,
0.010003909468650818,
0.00944469589740038,
0.08850177377462387,
0.00032734483829699457,
-0.074... | 0.109327 |
\* `options` {Object|string} \* `encoding` {string|null} \*\*Default:\*\* `'utf8'` \* `mode` {integer} \*\*Default:\*\* `0o666` \* `flag` {string} See [support of file system `flags`][]. \*\*Default:\*\* `'w'`. \* `flush` {boolean} If all data is successfully written to the file, and `flush` is `true`, `fs.fsync()` is ... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.054188601672649384,
0.03256864473223686,
-0.1034584790468216,
0.08518003672361374,
-0.012665188871324062,
-0.08586311340332031,
0.015940355136990547,
0.057665303349494934,
0.09750538319349289,
0.0588238388299942,
0.03314804285764694,
0.08202851563692093,
-0.039278168231248856,
-0.033871... | 0.204012 |
would be guaranteed to contain only `', World'`. ### `fs.writev(fd, buffers[, position], callback)` \* `fd` {integer} \* `buffers` {ArrayBufferView\[]} \* `position` {integer|null} \*\*Default:\*\* `null` \* `callback` {Function} \* `err` {Error} \* `bytesWritten` {integer} \* `buffers` {ArrayBufferView\[]} Write an ar... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
0.005073307082056999,
0.04638651758432388,
-0.08745643496513367,
-0.031602244824171066,
-0.06563826650381088,
-0.08542707562446594,
0.03712201490998268,
0.08498730510473251,
-0.018379511311650276,
-0.013238557614386082,
-0.05945562198758125,
0.0734332874417305,
0.02660817839205265,
-0.0256... | 0.064622 |
more detail. ### `fs.chownSync(path, uid, gid)` \* `path` {string|Buffer|URL} \* `uid` {integer} \* `gid` {integer} Synchronously changes owner and group of a file. Returns `undefined`. This is the synchronous version of [`fs.chown()`][]. See the POSIX chown(2) documentation for more detail. ### `fs.closeSync(fd)` \* `... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.09563625603914261,
0.03523290902376175,
-0.04620828852057457,
0.0386335514485836,
0.03061606176197529,
-0.08273409307003021,
0.03343270346522331,
0.055175717920064926,
0.0515010692179203,
-0.021207423880696297,
0.018998971208930016,
0.034345272928476334,
-0.03878933563828468,
-0.0131355... | 0.066884 |
parameter to `fs.exists()` accepts parameters that are inconsistent with other Node.js callbacks. `fs.existsSync()` does not use a callback. ```mjs import { existsSync } from 'node:fs'; if (existsSync('/etc/passwd')) console.log('The path exists.'); ``` ### `fs.fchmodSync(fd, mode)` \* `fd` {integer} \* `mode` {string|... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.08745153248310089,
0.0035835320595651865,
-0.09508048743009567,
0.023309307172894478,
0.05015198886394501,
-0.0635230541229248,
0.006888712290674448,
0.0852711871266365,
0.06946234405040741,
-0.018854821100831032,
0.026682181283831596,
0.05341582000255585,
0.004581134300678968,
0.003086... | 0.117848 |
{Object} \* `bigint` {boolean} Whether the numeric values in the returned {fs.Stats} object should be `bigint`. \*\*Default:\*\* `false`. \* `throwIfNoEntry` {boolean} Whether an exception will be thrown if no file system entry exists, rather than returning `undefined`. \*\*Default:\*\* `true`. \* Returns: {fs.Stats} R... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.03763774037361145,
0.02010868303477764,
-0.0396367646753788,
0.0179316233843565,
0.03673311322927475,
-0.03289508819580078,
0.0029826548416167498,
0.13650694489479065,
0.004252929240465164,
0.009598925709724426,
0.03419585898518562,
-0.007430805824697018,
-0.019196467474102974,
0.024537... | 0.09444 |
filenames returned. If the `encoding` is set to `'buffer'`, the filenames returned will be passed as {Buffer} objects. If `options.withFileTypes` is set to `true`, the result will contain {fs.Dirent} objects. ### `fs.readFileSync(path[, options])` \* `path` {string|Buffer|URL|integer} filename or file descriptor \* `op... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.052695952355861664,
0.035285480320453644,
-0.13506706058979034,
0.04565407708287239,
0.025477305054664612,
-0.05992140993475914,
0.04832026734948158,
0.1398317813873291,
0.04648122191429138,
-0.0433894544839859,
-0.04840398207306862,
0.03346038982272148,
-0.0602264329791069,
0.008539658... | 0.104793 |
`fs.rmdirSync(path[, options])` \* `path` {string|Buffer|URL} \* `options` {Object} There are currently no options exposed. There used to be options for `recursive`, `maxBusyTries`, and `emfileWait` but they were deprecated and removed. The `options` argument is still accepted for backwards compatibility but it is not ... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.0914931520819664,
-0.03727647662162781,
-0.09700707346200943,
0.020964881405234337,
0.05974404141306877,
-0.11221189796924591,
-0.020071247592568398,
0.06409899890422821,
0.056881412863731384,
-0.009619480930268764,
0.05392484739422798,
0.010629000142216682,
-0.04280000552535057,
0.0594... | 0.076168 |
### `fs.writeSync(fd, buffer, offset[, length[, position]])` \* `fd` {integer} \* `buffer` {Buffer|TypedArray|DataView} \* `offset` {integer} \*\*Default:\*\* `0` \* `length` {integer} \*\*Default:\*\* `buffer.byteLength - offset` \* `position` {integer|null} \*\*Default:\*\* `null` \* Returns: {number} The number of b... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
0.015805723145604134,
0.026368550956249237,
-0.09009462594985962,
0.027442531660199165,
-0.07277213782072067,
-0.05307890474796295,
0.022652560845017433,
0.048156727105379105,
0.029180102050304413,
-0.05082928016781807,
-0.07455535978078842,
0.03130640834569931,
-0.03650820627808571,
-0.07... | 0.091717 |
are no more directory entries to read, `null` will be returned. Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms. Entries added or removed while iterating over the directory might not be included in the iteration results. #### `... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.08890999108552933,
0.02177496626973152,
-0.06840752065181732,
0.0935492143034935,
0.03549351915717125,
-0.07561983913183212,
-0.021491507068276405,
0.07981864362955093,
0.08848751336336136,
-0.060781996697187424,
0.08695179969072342,
0.0905967652797699,
-0.018276019021868706,
-0.0296865... | 0.019078 |
is no longer usable in the event handler. #### Event: `'error'` \* `error` {Error} Emitted when an error occurs while watching the file. The errored {fs.FSWatcher} object is no longer usable in the event handler. #### `watcher.close()` Stop watching for changes on the given {fs.FSWatcher}. Once stopped, the {fs.FSWatch... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.052402887493371964,
-0.005381846334785223,
0.02569042332470417,
0.06798519194126129,
0.1741248369216919,
0.005623653065413237,
0.016367079690098763,
0.05887986347079277,
0.10180617868900299,
0.04296575486660004,
-0.08939716964960098,
0.016605505719780922,
-0.061208274215459824,
-0.03978... | 0.09321 |
10 Oct 2011 23:24:11 GMT, mtime: Mon, 10 Oct 2011 23:24:11 GMT, ctime: Mon, 10 Oct 2011 23:24:11 GMT, birthtime: Mon, 10 Oct 2011 23:24:11 GMT, // Instances of Temporal.Instant atimeInstant: 2011-10-10T23:24:11.0001Z, mtimeInstant: 2011-10-10T23:24:11.0001Z, ctimeInstant: 2011-10-10T23:24:11.0001Z, birthtimeInstant: 20... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.019047308713197708,
0.014377482235431671,
0.07118787616491318,
-0.010057860054075718,
0.07276325672864914,
-0.07510272413492203,
-0.02459440939128399,
0.03699604421854019,
0.060122981667518616,
0.019570544362068176,
-0.02558150887489319,
-0.01887226291000843,
-0.09129372984170914,
0.002... | 0.085419 |
timestamp indicating the last time this file was accessed expressed in nanoseconds since the POSIX Epoch. #### `stats.mtimeNs` \* Type: {bigint} Only present when `bigint: true` is passed into the method that generates the object. The timestamp indicating the last time this file was modified expressed in nanoseconds si... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.08801735192537308,
0.0936659425497055,
-0.031107990071177483,
0.03541626036167145,
0.07748549431562424,
-0.0909554734826088,
-0.032683294266462326,
0.08121386170387268,
0.04422236979007721,
0.06202474236488342,
0.007829390466213226,
0.01207332219928503,
-0.023494187742471695,
-0.0529344... | 0.128888 |
} ``` `bigint` version: ```console StatFs { type: 1397114950n, bsize: 4096n, frsize: 4096n, blocks: 121938943n, bfree: 61058895n, bavail: 61058895n, files: 999n, ffree: 1000000n } ``` #### `statfs.bavail` \* Type: {number|bigint} Free blocks available to unprivileged users. Multiply by [`statfs.bsize`][] to get the num... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.015626519918441772,
0.056540317833423615,
-0.06761614233255386,
0.08586881309747696,
0.02183236926794052,
-0.017832115292549133,
-0.005458247382193804,
0.11067068576812744,
0.0036885791923850775,
0.02987494319677353,
-0.0798821821808815,
-0.001356801949441433,
-0.014953588135540485,
-0.... | 0.050544 |
type of data you can send to the write function, supported values are `'utf8'` or `'buffer'`. \*\*Default\*\*: `'utf8'`. \* `dest`: {string} A path to a file to be written to (mode controlled by the append option). \* `fd`: {number} A file descriptor, something that is returned by `fs.open()` or `fs.openSync()`. \* `fs... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.03620855510234833,
-0.000471810664748773,
-0.08722809702157974,
0.07473185658454895,
-0.0033685341477394104,
-0.07582948356866837,
-0.04354724660515785,
0.1095830574631691,
0.04033873975276947,
0.02555268257856369,
-0.0808791071176529,
0.052298448979854584,
-0.02518538385629654,
-0.0093... | 0.145113 |
periodic flushes will be performed. #### `utf8Stream.reopen(file)` \* `file`: {string|Buffer|URL} A path to a file to be written to (mode controlled by the append option). Reopen the file in place, useful for log rotation. #### `utf8Stream.sync` \* {boolean} Whether the stream is writing synchronously or asynchronously... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.012055502273142338,
-0.00863064918667078,
-0.014690344221889973,
0.03601603955030441,
-0.057117462158203125,
-0.08207737654447556,
0.014400109648704529,
-0.014322636649012566,
0.05456247180700302,
0.04604645073413849,
0.030211007222533226,
0.06330584734678268,
0.028237750753760338,
-0.0... | 0.025275 |
| Description | | --- | --- | | `COPYFILE_EXCL` | If present, the copy operation will fail with an error if the destination path already exists. | | `COPYFILE_FICLONE` | If present, the copy operation will attempt to create a copy-on-write reflink. If the underlying platform does not support copy-on-write, then a fallb... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.12403184920549393,
-0.07187502086162567,
-0.056479956954717636,
0.07761699706315994,
0.052662137895822525,
-0.06430301070213318,
-0.0007804937195032835,
0.10054565221071243,
-0.0031319058034569025,
0.008010993711650372,
0.05758963152766228,
0.03283994272351265,
-0.009892924688756466,
-0... | 0.115162 |
for a regular file. | | `S_IFDIR` | File type constant for a directory. | | `S_IFCHR` | File type constant for a character-oriented device file. | | `S_IFBLK` | File type constant for a block-oriented device file. | | `S_IFIFO` | File type constant for a FIFO/pipe. | | `S_IFLNK` | File type constant for a symbolic link... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.041843947023153305,
0.003878659103065729,
-0.1148456484079361,
0.0061855739913880825,
0.04312269017100334,
-0.006679460406303406,
0.02483316883444786,
0.1192932277917862,
-0.045525502413511276,
-0.01228110957890749,
0.07792654633522034,
-0.01368492841720581,
-0.05624392628669739,
0.0390... | 0.168917 |
relative filename. Relative paths will be resolved relative to the current working directory as determined by calling `process.cwd()`. Example using an absolute path on POSIX: ```mjs import { open } from 'node:fs/promises'; let fd; try { fd = await open('/open/some/file.txt', 'r'); // Do something with the file } final... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.06782390922307968,
0.02185758575797081,
-0.00896790623664856,
0.014371111989021301,
0.03480682522058487,
-0.04603968933224678,
-0.05435327813029289,
0.13654892146587372,
0.08267925679683685,
0.02279321663081646,
-0.027838706970214844,
0.10571248829364777,
-0.028238793835043907,
0.040056... | 0.083525 |
the concept of per-drive working directory. This behavior can be observed when using a drive path without a backslash. For example `fs.readdirSync('C:\\')` can potentially return a different result than `fs.readdirSync('C:')`. For more information, see [this MSDN page][MSDN-Rel-Path]. ### File descriptors On POSIX syst... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.06871159374713898,
-0.04459472373127937,
-0.05536108836531639,
0.0850730910897255,
0.06205546483397484,
-0.09102188050746918,
-0.032464202493429184,
0.05321856960654259,
0.17557334899902344,
-0.0036999452859163284,
-0.017975805327296257,
0.09007987380027771,
-0.003562330035492778,
-0.01... | 0.13632 |
file system cache. This is primarily useful for opening files on NFS mounts as it allows skipping the potentially stale local cache. It has a very real impact on I/O performance so using this flag is not recommended unless it is needed. This doesn't turn `fs.open()` or `fsPromises.open()` into a synchronous blocking ca... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.06609208881855011,
0.02184034325182438,
-0.09622971713542938,
0.07234415411949158,
0.06796474754810333,
-0.08708792924880981,
0.022129226475954056,
0.05992685258388519,
0.08173391968011856,
-0.007973037660121918,
0.03213666379451752,
0.07781243324279785,
-0.05482516437768936,
-0.0017849... | 0.23336 |
#fspromisesutimespath-atime-mtime [`inotify(7)`]: https://man7.org/linux/man-pages/man7/inotify.7.html [`kqueue(2)`]: https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2 [`minimatch`]: https://github.com/isaacs/minimatch [`node:stream/iter`]: stream\_iter.md [`statfs.bsize`]: #statfsbsize [`stream/iter pipeTo()`... | https://github.com/nodejs/node/blob/main/doc/api/fs.md | main | nodejs | [
-0.07027873396873474,
0.04123203456401825,
-0.07284760475158691,
0.012447049841284752,
0.0748090073466301,
-0.01977311447262764,
-0.013428403995931149,
0.1460469365119934,
-0.04842808470129967,
0.01619948260486126,
-0.060593776404857635,
-0.0927945226430893,
-0.010493558831512928,
-0.03503... | 0.133449 |
# Process The `process` object provides information about, and control over, the current Node.js process. ```mjs import process from 'node:process'; ``` ```cjs const process = require('node:process'); ``` ## Process events The `process` object is an instance of [`EventEmitter`][]. ### Event: `'beforeExit'` The `'before... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.08048714697360992,
-0.014997819438576698,
0.026660412549972534,
0.07168350368738174,
0.11290401220321655,
-0.02473660744726658,
-0.03937844932079315,
0.02839348092675209,
0.04308680444955826,
-0.007054581772536039,
-0.10734138637781143,
0.07444368302822113,
0.02389288879930973,
-0.03275... | 0.118276 |
[`childprocess.send()`][] is received by the child process. The message goes through serialization and parsing. The resulting message might not be the same as what is originally sent. If the `serialization` option was set to `advanced` used when spawning the process, the `message` argument can contain data that JSON is... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.09400723874568939,
0.058551859110593796,
0.07174535095691681,
0.0774945393204689,
0.06010061129927635,
-0.08925466239452362,
-0.042247701436281204,
0.05456407368183136,
0.1245541125535965,
0.007562687154859304,
-0.032359831035137177,
0.05297991633415222,
0.017718633636832237,
0.00449419... | 0.068171 |
code. Otherwise, in the presence of such handler the process will exit with 0. ```mjs import process from 'node:process'; import fs from 'node:fs'; process.on('uncaughtException', (err, origin) => { fs.writeSync( process.stderr.fd, `Caught exception: ${err}\n` + `Exception origin: ${origin}\n`, ); }); setTimeout(() => ... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.03145746886730194,
0.02097627893090248,
-0.04946551099419594,
0.05636772885918617,
0.11512482911348343,
-0.031780872493982315,
-0.07205212116241455,
0.06646362692117691,
0.06956450641155243,
0.03688102588057518,
-0.03756081685423851,
0.030720215290784836,
0.0016908359248191118,
-0.08410... | 0.088982 |
and no error handler is attached to the promise within a turn of the event loop. When programming with Promises, exceptions are encapsulated as "rejected promises". Rejections can be caught and handled using [`promise.catch()`][] and are propagated through a `Promise` chain. The `'unhandledRejection'` event is useful f... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.0665804073214531,
0.06757089495658875,
0.03708575293421745,
0.0879175215959549,
0.0809931755065918,
-0.004695241339504719,
-0.012948752380907536,
0.09747356921434402,
0.09521161019802094,
0.00737466337159276,
-0.002842705463990569,
-0.004307601135224104,
0.05831558629870415,
-0.00352024... | 0.096854 |
flag. The following example illustrates the warning that is printed to `stderr` when too many listeners have been added to an event: ```console $ node > events.defaultMaxListeners = 1; > process.on('foo', () => {}); > process.on('foo', () => {}); > (node:38638) MaxListenersExceededWarning: Possible EventEmitter memory ... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
0.05139315500855446,
0.0014431604649871588,
-0.027554646134376526,
0.06336663663387299,
0.09623721987009048,
0.0005194791010580957,
0.07205235958099365,
0.05467234179377556,
0.060367703437805176,
0.006367068737745285,
-0.03151770681142807,
0.017565596848726273,
-0.012249864637851715,
-0.05... | 0.090052 |
'node:process'; // Begin reading from stdin so the process does not exit. process.stdin.resume(); process.on('SIGINT', () => { console.log('Received SIGINT. Press Control-D to exit.'); }); // Using a single function to handle multiple signals function handle(signal) { console.log(`Received ${signal}`); } process.on('SI... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
0.008644909597933292,
-0.03693269193172455,
-0.009796441532671452,
-0.013064635917544365,
-0.005624841433018446,
-0.01763405092060566,
0.02884121611714363,
0.06751512736082077,
0.11516570299863815,
-0.024872681125998497,
-0.06115855649113655,
0.0019026424270123243,
-0.047752972692251205,
-... | 0.100512 |
invoked when an uncaught exception occurs, receiving the exception value as its first argument. Unlike [`process.setUncaughtExceptionCaptureCallback()`][], this function allows multiple callbacks to be registered and does not conflict with the [`domain`][] module. Callbacks are called in reverse order of registration (... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.026473715901374817,
0.0013947138795629144,
0.023964475840330124,
0.025576651096343994,
0.045712001621723175,
-0.039468225091695786,
-0.003371563972905278,
0.07233072817325592,
0.07191021740436554,
-0.01786130480468273,
-0.006719130557030439,
-0.001463597291149199,
0.03356170654296875,
-... | 0.044623 |
the amount of free memory that is still available to the process (in bytes). See [`uv\_get\_available\_memory`][uv\_get\_available\_memory] for more information. ## `process.channel` \* Type: {Object} If the Node.js process was spawned with an IPC channel (see the [Child Process][] documentation), the `process.channel`... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.06300672143697739,
-0.032441191375255585,
-0.0258017648011446,
0.08865026384592056,
0.09948381036520004,
-0.0430663526058197,
0.01910325512290001,
0.03957056626677513,
0.10607587546110153,
0.04463157802820206,
-0.05396879091858864,
0.10876739770174026,
-0.07249366492033005,
-0.090735211... | 0.11668 |
the argument to the function, to get a diff reading. ```mjs import { cpuUsage } from 'node:process'; const startUsage = cpuUsage(); // { user: 38579, system: 6986 } // spin the CPU for 500 milliseconds const now = Date.now(); while (Date.now() - now < 500); console.log(cpuUsage(startUsage)); // { user: 514883, system: ... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.04875217005610466,
0.05759096518158913,
-0.013643326237797737,
0.024895979091525078,
0.01964597962796688,
-0.0942792147397995,
-0.031683098524808884,
0.06986040621995926,
0.029375869780778885,
-0.013658963143825531,
-0.005911799147725105,
-0.012455645017325878,
-0.05149773135781288,
-0.... | 0.121571 |
process warnings. These can be listened for by adding a handler to the [`'warning'`][process\_warning] event. ```mjs import { emitWarning } from 'node:process'; // Emit a warning with a code and additional detail. emitWarning('Something happened!', { code: 'MY\_WARNING', detail: 'This is some additional information', }... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.048040781170129776,
0.04962678253650665,
0.019024083390831947,
0.08162882924079895,
0.13295844197273254,
-0.041652560234069824,
0.039211664348840714,
0.06379818171262741,
0.07482064515352249,
-0.016466928645968437,
-0.04673636704683304,
-0.0494873933494091,
0.008903948590159416,
-0.0161... | 0.217022 |
CustomWarning: Something happened! ``` ```cjs const { emitWarning } = require('node:process'); // Emit a warning using an Error object. const myWarning = new Error('Something happened!'); // Use the Error name property to specify the type name myWarning.name = 'CustomWarning'; myWarning.code = 'WARN001'; emitWarning(my... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.01774773932993412,
0.05917152389883995,
0.04918760433793068,
0.10957380384206772,
0.055458106100559235,
-0.029658900573849678,
0.04810437187552452,
0.08892872929573059,
0.022223588079214096,
0.015967871993780136,
-0.06267446279525757,
-0.044973134994506836,
0.01394533272832632,
-0.00277... | 0.156808 |
thread's `process.env`, or whatever was specified as the `env` option to the [`Worker`][] constructor. Changes to `process.env` will not be visible across [`Worker`][] threads, and only the main thread can make changes that are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.04121404141187668,
-0.020608952268958092,
-0.051413245499134064,
0.0030120171140879393,
0.09116123616695404,
-0.07418981194496155,
-0.00026595412055030465,
0.005465629976242781,
0.05774237588047981,
0.05086382105946541,
-0.050890859216451645,
0.04080485180020332,
-0.045171014964580536,
... | 0.133978 |
still asynchronous operations pending that have not yet completed fully, including I/O operations to `process.stdout` and `process.stderr`. In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own \_if there is no additional work pending\_ in the eve... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.04441418498754501,
0.06787297129631042,
0.011738821864128113,
0.08871042728424072,
0.07970765233039856,
-0.10241005569696426,
-0.031677450984716415,
0.04082188010215759,
0.07425881922245026,
0.021766234189271927,
-0.05944394692778587,
0.04692506417632103,
-0.0366046279668808,
-0.1090119... | 0.100313 |
boolean value that is `true` if the current Node.js build includes support for IPv6. Since all Node.js builds have IPv6 support, this value is always `true`. ## `process.features.require\_module` \* Type: {boolean} A boolean value that is `true` if the current Node.js build supports [loading ECMAScript modules using `r... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.062341831624507904,
0.06472337245941162,
0.01602178066968918,
0.025713371112942696,
0.11217571794986725,
-0.022183116525411606,
-0.0390448160469532,
-0.0635550245642662,
0.03724506497383118,
-0.05466838181018829,
-0.010399497114121914,
0.007600055541843176,
-0.05277944728732109,
0.02501... | 0.01187 |
from the finalization registry. ```cjs const { finalization } = require('node:process'); // Please make sure that the function passed to finalization.register() // does not create a closure around unnecessary objects. function onFinalize(obj, event) { // You can do whatever you want with the object obj.dispose(); } fun... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.03174207732081413,
0.08559942245483398,
0.025869274511933327,
0.06269998103380203,
0.018006063997745514,
-0.048048242926597595,
0.006065374705940485,
0.08559003472328186,
0.028431124985218048,
0.054138779640197754,
-0.07679051160812378,
0.06475880742073059,
-0.06886035948991776,
-0.0302... | 0.106687 |
// Free your resources synchronously }, }; finalization.register(myDisposableObject, onFinalize); // Do something myDisposableObject.dispose(); finalization.unregister(myDisposableObject); } setup(); ``` ```mjs import { finalization } from 'node:process'; // Please make sure that the function passed to finalization.reg... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.057646024972200394,
0.06952612102031708,
0.02268034592270851,
0.08975092321634293,
0.03954484686255455,
-0.05198404937982559,
0.0303779449313879,
0.05379277467727661,
0.028482606634497643,
0.04053733870387077,
-0.0651521235704422,
0.057412777096033096,
-0.05347783863544464,
-0.032135147... | 0.111111 |
} ``` ```cjs if (process.geteuid) { console.log(`Current uid: ${process.geteuid()}`); } ``` This function is only available on POSIX platforms (i.e. not Windows or Android). ## `process.getgid()` \* Returns: {Object} The `process.getgid()` method returns the numerical group identity of the process. (See getgid(2).) ```... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.08366040140390396,
0.05076377093791962,
-0.007313677109777927,
0.013299062848091125,
0.04228053614497185,
-0.06320469081401825,
0.04007336124777794,
0.036647144705057144,
0.10870800912380219,
0.017030373215675354,
0.026303131133317947,
-0.03660894185304642,
-0.03892534598708153,
-0.0065... | 0.151798 |
1000); ``` ```cjs const { hrtime } = require('node:process'); const start = hrtime.bigint(); // 191051479007711n setTimeout(() => { const end = hrtime.bigint(); // 191052633396993n console.log(`Benchmark took ${end - start} nanoseconds`); // Benchmark took 1154389282 nanoseconds }, 1000); ``` ## `process.initgroups(use... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.02917572110891342,
0.0426822267472744,
-0.06470732390880585,
0.032173093408346176,
0.023056333884596825,
-0.063307985663414,
-0.020613225176930428,
0.056839246302843094,
0.03586502745747566,
0.004844523500651121,
-0.030258581042289734,
0.015796717256307602,
-0.04850280284881592,
-0.0667... | 0.12423 |
`external` {integer} \* `arrayBuffers` {integer} Returns an object describing the memory usage of the Node.js process measured in bytes. ```mjs import { memoryUsage } from 'node:process'; console.log(memoryUsage()); // Prints: // { // rss: 4935680, // heapTotal: 1826816, // heapUsed: 650472, // external: 49879, // arra... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.023349661380052567,
0.027957651764154434,
-0.04985927790403366,
0.07135191559791565,
0.038240108639001846,
-0.05032843351364136,
0.02124493010342121,
0.10943381488323212,
0.05707307532429695,
-0.008876560255885124,
-0.08755049854516983,
0.02505536563694477,
-0.015744879841804504,
-0.021... | 0.174048 |
nextTick(() => { this.startDoingStuff(); }); } const thing = new MyThing(); thing.getReadyForStuff(); // thing.startDoingStuff() gets called now, not before. ``` ```cjs const { nextTick } = require('node:process'); function MyThing(options) { this.setupOptions(options); nextTick(() => { this.startDoingStuff(); }); } co... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.12133617699146271,
0.009806682355701923,
-0.027705011889338493,
0.014537306502461433,
0.052559997886419296,
-0.025328680872917175,
-0.01396595872938633,
0.07824359089136124,
0.07391984015703201,
-0.02302989363670349,
0.003708138596266508,
0.04923500493168831,
-0.07128476351499557,
-0.01... | 0.120519 |
for the [`'warning'` event][process\_warning] and the [`emitWarning()` method][process\_emit\_warning] for more information about this flag's behavior. ## `process.permission` \* Type: {Object} This API is available through the [`--permission`][] flag. `process.permission` is an object whose methods are used to manage ... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.030737802386283875,
0.0485258586704731,
-0.10772042721509933,
0.05661064013838768,
0.08815174549818039,
-0.07644882798194885,
0.1229444220662117,
0.061619918793439865,
0.003408410120755434,
-0.009838190861046314,
-0.036019179970026016,
-0.0072786808013916016,
0.0188889242708683,
0.03674... | 0.164537 |
`'linux'` \* `'openbsd'` \* `'sunos'` \* `'win32'` ```mjs import { platform } from 'node:process'; console.log(`This platform is ${platform}`); ``` ```cjs const { platform } = require('node:process'); console.log(`This platform is ${platform}`); ``` The value `'android'` may also be returned if the Node.js is built on ... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.08118080347776413,
0.061798274517059326,
-0.0057719857431948185,
-0.04913540929555893,
0.060492463409900665,
-0.039363961666822433,
-0.008290431462228298,
0.0786527544260025,
0.060968704521656036,
0.010692961513996124,
-0.015699956566095352,
0.017948461696505547,
0.04427351430058479,
-0... | 0.058475 |
${report.compact}`); ``` ```cjs const { report } = require('node:process'); console.log(`Reports are compact? ${report.compact}`); ``` ### `process.report.directory` \* Type: {string} Directory where the report is written. The default value is the empty string, indicating that reports are written to the current working... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.051364265382289886,
0.052943576127290726,
-0.06181620433926582,
0.09460010379552841,
0.046091627329587936,
0.005797357298433781,
-0.009237188845872879,
0.14635445177555084,
0.08603458851575851,
0.044063933193683624,
-0.0037068743258714676,
0.062177203595638275,
0.019686518236994743,
0.0... | 0.088811 |
present. If the value of `filename` is set to `'stdout'` or `'stderr'`, the report is written to the stdout or stderr of the process respectively. ```mjs import { report } from 'node:process'; report.writeReport(); ``` ```cjs const { report } = require('node:process'); report.writeReport(); ``` Additional documentation... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.035235293209552765,
0.0881180390715599,
-0.08482561260461807,
0.12599964439868927,
0.03322906419634819,
-0.009498740546405315,
0.014035980217158794,
0.16421546041965485,
0.01675601303577423,
0.016744745895266533,
-0.02705368399620056,
0.017393091693520546,
0.039189599454402924,
-0.00506... | 0.160188 |
{boolean} If Node.js is spawned with an IPC channel, the `process.send()` method can be used to send messages to the parent process. Messages will be received as a [`'message'`][] event on the parent's [`ChildProcess`][] object. If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. The mes... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.06115156412124634,
0.019020112231373787,
-0.009977691806852818,
0.05323096364736557,
0.03548780456185341,
-0.09097057580947876,
0.04357036203145981,
0.024632412940263748,
0.10078234225511551,
0.0183090902864933,
-0.041992343962192535,
0.05020463839173317,
0.012536285445094109,
-0.037611... | 0.169133 |
} catch (err) { console.error(`Failed to set groups: ${err}`); } } ``` This function is only available on POSIX platforms (i.e. not Windows or Android). This feature is not available in [`Worker`][] threads. ## `process.setuid(id)` \* `id` {integer | string} The `process.setuid(id)` method sets the user identity of the... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.08273034542798996,
0.04621775075793266,
-0.03417966514825821,
-0.010746553540229797,
0.0029620658606290817,
-0.04950669780373573,
0.06827665120363235,
0.02670079655945301,
0.029791133478283882,
-0.03155701234936714,
-0.012911010533571243,
-0.029472611844539642,
0.022338738664984703,
-0.... | 0.123576 |
`process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. ### `process.stdin.fd` \* Type: {number} This property refers to the value of underlying file descriptor of `process.stdin`. The value is fixed at `0`. In [`Worker`][] threads, this field ... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.046737413853406906,
-0.025466609746217728,
-0.04501417651772499,
0.03244698792695999,
0.0023529904428869486,
-0.020778998732566833,
0.03156328201293945,
0.058607518672943115,
0.037594642490148544,
-0.05105743184685707,
-0.08963321894407272,
0.09084218740463257,
-0.06292956322431564,
-0.... | 0.127864 |
The `process.threadCpuUsage()` method returns the user and system CPU time usage of the current worker thread, in an object with properties `user` and `system`, whose values are microsecond values (millionth of a second). The result of a previous call to `process.threadCpuUsage()` can be passed as the argument to the f... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.06588131189346313,
-0.0061106509529054165,
-0.0003161110798828304,
0.005578308366239071,
0.0015133918495848775,
-0.06679603457450867,
-0.003686127718538046,
0.047897595912218094,
0.07528569549322128,
-0.007909966632723808,
-0.06390493363142014,
0.07579700648784637,
-0.03192976489663124,
... | 0.12298 |
`process.uptime()` \* Returns: {number} The `process.uptime()` method returns the number of seconds the current Node.js process has been running. The return value includes fractions of a second. Use `Math.floor()` to get whole seconds. ## `process.version` \* Type: {string} The `process.version` property contains the N... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.05675604194402695,
0.0827641636133194,
0.016342729330062866,
0.02019280567765236,
0.06543714553117752,
-0.04153194651007652,
-0.03858913108706474,
0.08004011958837509,
0.11335577070713043,
0.0022390885278582573,
-0.0628523975610733,
0.012733753770589828,
-0.08027967065572739,
-0.0566120... | 0.070582 |
used outside of a function in the top-level code, but the passed `Promise` never settled. \* `14` \*\*Snapshot Failure\*\*: Node.js was started to build a V8 startup snapshot and it failed because certain requirements of the state of the application were not met. \* `>128` \*\*Signal Exits\*\*: If Node.js receives a fa... | https://github.com/nodejs/node/blob/main/doc/api/process.md | main | nodejs | [
-0.07825615257024765,
0.04461965709924698,
0.026188593357801437,
-0.06133219599723816,
0.006841093301773071,
-0.046254537999629974,
-0.0658540278673172,
0.08075456321239471,
0.04140811786055565,
0.010201637633144855,
-0.035141702741384506,
0.047480981796979904,
-0.019814172759652138,
-0.08... | 0.143971 |
# Async hooks > Stability: 1 - Experimental. Please migrate away from this API, if you can. > We do not recommend using the [`createHook`][], [`AsyncHook`][], and > [`executionAsyncResource`][] APIs as they have usability issues, safety risks, > and performance implications. Async context tracking use cases are better ... | https://github.com/nodejs/node/blob/main/doc/api/async_hooks.md | main | nodejs | [
-0.09592781960964203,
0.002618466503918171,
-0.1522120088338852,
0.12007278203964233,
0.009252763353288174,
-0.10082948952913284,
0.03593885898590088,
-0.02868065983057022,
-0.013624369166791439,
-0.04368295893073082,
-0.01109294593334198,
-0.04939357191324234,
0.014330394566059113,
-0.083... | 0.139255 |
the callback of the // current execution scope to call. const tid = async\_hooks.triggerAsyncId(); // Create a new AsyncHook instance. All of these callbacks are optional. const asyncHook = async\_hooks.createHook({ init, before, after, destroy, promiseResolve }); // Allow callbacks of this AsyncHook instance to call. ... | https://github.com/nodejs/node/blob/main/doc/api/async_hooks.md | main | nodejs | [
-0.12041902542114258,
0.06459405273199081,
-0.05531502887606621,
0.10852760821580887,
-0.008106610737740993,
-0.039303045719861984,
0.024375760927796364,
-0.00901680625975132,
0.08920256048440933,
-0.046026699244976044,
-0.06145238131284714,
0.035383354872465134,
-0.03238583356142044,
-0.0... | 0.091053 |
The reason for this error handling behavior is that these callbacks are running at potentially volatile points in an object's lifetime, for example during class construction and destruction. Because of this, it is deemed necessary to bring down the process quickly in order to prevent an unintentional abort in the futur... | https://github.com/nodejs/node/blob/main/doc/api/async_hooks.md | main | nodejs | [
-0.0824817419052124,
0.046488188207149506,
-0.05375855788588524,
0.16390493512153625,
0.011263854801654816,
-0.11627870053052902,
-0.024638470262289047,
0.08339500427246094,
0.04974270239472389,
-0.007479085586965084,
-0.00202352786436677,
0.0851878821849823,
-0.0030318358913064003,
-0.078... | 0.026634 |
closing it before the resource can be used. The following snippet demonstrates this. ```mjs import { createServer } from 'node:net'; createServer().listen(function() { this.close(); }); // OR clearTimeout(setTimeout(() => {}, 10)); ``` ```cjs require('node:net').createServer().listen(function() { this.close(); }); // O... | https://github.com/nodejs/node/blob/main/doc/api/async_hooks.md | main | nodejs | [
-0.11306934803724289,
0.0747176855802536,
-0.0027296843472868204,
0.07097718119621277,
0.08637262880802155,
-0.04002287983894348,
0.03378407284617424,
-0.04152870178222656,
0.11310894042253494,
0.004696850199252367,
-0.04823927581310272,
0.08092533051967621,
0.02184646762907505,
-0.0239298... | 0.133412 |
it. ##### Asynchronous context example The context tracking use case is covered by the stable API [`AsyncLocalStorage`][]. This example only illustrates async hooks operation but [`AsyncLocalStorage`][] fits better to this use case. The following is an example with additional information about the calls to `init` betwe... | https://github.com/nodejs/node/blob/main/doc/api/async_hooks.md | main | nodejs | [
-0.07036424428224564,
0.03693334013223648,
-0.09979183971881866,
0.08499016612768173,
0.054897699505090714,
-0.04469458758831024,
0.07683249562978745,
0.029692014679312706,
0.039651840925216675,
-0.060789089649915695,
-0.025309022516012192,
-0.008795403875410557,
0.014079887419939041,
-0.0... | 0.155138 |
about to execute the callback. The `before` callback will be called 0 to N times. The `before` callback will typically be called 0 times if the asynchronous operation was cancelled or, for example, if no connections are received by a TCP server. Persistent asynchronous resources like a TCP server will typically call th... | https://github.com/nodejs/node/blob/main/doc/api/async_hooks.md | main | nodejs | [
-0.07939353585243225,
-0.01132458820939064,
-0.05943332985043526,
0.09581758826971054,
0.028275536373257637,
-0.07390870898962021,
-0.04100089892745018,
0.04652949050068855,
0.15813742578029633,
-0.060061920434236526,
-0.008545898832380772,
0.11164942383766174,
-0.016800040379166603,
-0.10... | 0.12745 |
state: req.url }; setTimeout(function() { res.end(JSON.stringify(executionAsyncResource()[sym])); }, 100); }).listen(3000); ``` ```cjs const { createServer } = require('node:http'); const { executionAsyncId, executionAsyncResource, createHook, } = require('node:async\_hooks'); const sym = Symbol('state'); // Private sy... | https://github.com/nodejs/node/blob/main/doc/api/async_hooks.md | main | nodejs | [
-0.07294683158397675,
0.05211451277136803,
-0.03740568459033966,
0.030956657603383064,
-0.022244103252887726,
-0.030941270291805267,
-0.03735516220331192,
0.014771352522075176,
0.04925696551799774,
-0.0069891358725726604,
-0.042216360569000244,
-0.033441416919231415,
-0.02286488562822342,
... | 0.123337 |
callback to be executed. Installing async hooks via `async\_hooks.createHook` enables promise execution tracking: ```mjs import { createHook, executionAsyncId, triggerAsyncId } from 'node:async\_hooks'; createHook({ init() {} }).enable(); // forces PromiseHooks to be enabled. Promise.resolve(1729).then(() => { console.... | https://github.com/nodejs/node/blob/main/doc/api/async_hooks.md | main | nodejs | [
-0.128844752907753,
0.0688132643699646,
-0.036763399839401245,
0.08609097450971603,
-0.003919552080333233,
-0.003693278646096587,
-0.06787533313035965,
0.01595226861536503,
0.0487353578209877,
-0.0154853081330657,
-0.0286252498626709,
-0.0069409580901265144,
-0.03117959573864937,
-0.066065... | 0.1103 |
# Permissions Permissions can be used to control what system resources the Node.js process has access to or what actions the process can take with those resources. \* [Process-based permissions](#process-based-permissions) control the Node.js process's access to resources. The resource can be entirely allowed or denied... | https://github.com/nodejs/node/blob/main/doc/api/permissions.md | main | nodejs | [
-0.0829429104924202,
0.004237644374370575,
-0.021641915664076805,
0.05161960422992706,
0.09467850625514984,
-0.0424310564994812,
0.011714525520801544,
0.04595813900232315,
0.05547197908163071,
0.009975849650800228,
-0.06881948560476303,
0.15101517736911774,
0.028465373441576958,
-0.0150694... | 0.152927 |
that was originally granted. ```js const fs = require('node:fs'); // Read config at startup while we still have permission const config = fs.readFileSync('/etc/myapp/config.json', 'utf8'); // Drop read access to /etc/myapp after initialization process.permission.drop('fs.read', '/etc/myapp'); // This will now throw ERR... | https://github.com/nodejs/node/blob/main/doc/api/permissions.md | main | nodejs | [
-0.08637060970067978,
0.06514322012662888,
-0.09060144424438477,
0.009410322643816471,
0.08029646426439285,
-0.06556449830532074,
0.06025917828083038,
0.1320524662733078,
-0.03885628283023834,
0.003672079648822546,
0.010381706058979034,
0.08187741786241531,
0.00026678043650463223,
0.035735... | 0.125501 |
Grant read access to the global `node\_modules` directory by running: ```bash npx --node-options="--permission --allow-fs-read=$(npm prefix -g)" package-name ``` 2. \*\*Using the `npx` Cache\*\* If you are installing the package temporarily or relying on the `npx` cache, grant read access to the npm cache directory: ``... | https://github.com/nodejs/node/blob/main/doc/api/permissions.md | main | nodejs | [
0.027330249547958374,
-0.0012518542353063822,
-0.0663248598575592,
-0.005028127692639828,
0.032393090426921844,
-0.02527858503162861,
0.0411139577627182,
0.0385231152176857,
-0.05441223084926605,
0.05012132227420807,
-0.024453623220324516,
0.029746102169156075,
-0.04227425903081894,
0.0458... | 0.093683 |
[`--allow-ffi`]: cli.md#--allow-ffi [`--allow-fs-read`]: cli.md#--allow-fs-read [`--allow-fs-write`]: cli.md#--allow-fs-write [`--allow-net`]: cli.md#--allow-net [`--allow-wasi`]: cli.md#--allow-wasi [`--allow-worker`]: cli.md#--allow-worker [`--permission`]: cli.md#--permission [`npx`]: https://docs.npmjs.com/cli/comm... | https://github.com/nodejs/node/blob/main/doc/api/permissions.md | main | nodejs | [
-0.02972504496574402,
0.03161399066448212,
-0.11522342264652252,
-0.0508127436041832,
0.0255698524415493,
-0.05746204033493996,
0.015052134171128273,
-0.01999891735613346,
-0.03484537452459335,
0.041011568158864975,
-0.05868452787399292,
0.013582208193838596,
-0.027095137163996696,
0.06833... | 0.135429 |
# Web Crypto API > Stability: 2 - Stable Node.js provides an implementation of the [Web Crypto API][] standard. Use `globalThis.crypto` or `require('node:crypto').webcrypto` to access this module. ```js const { subtle } = globalThis.crypto; (async function() { const key = await subtle.generateKey({ name: 'HMAC', hash: ... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.07680782675743103,
0.016973188146948814,
-0.03547380864620209,
0.04461837187409401,
0.03953879699110985,
-0.0801072046160698,
0.0026436985936015844,
0.018111389130353928,
0.016975242644548416,
-0.05077210068702698,
-0.009318947792053223,
-0.007757115177810192,
0.03273927792906761,
-0.01... | 0.054033 |
await subtle.importKey(format, keyData, { name: 'HMAC', hash, }, true, ['sign', 'verify']); return key; } ``` ### Wrapping and unwrapping keys ```js const { subtle } = globalThis.crypto; async function generateAndWrapHmacKey(format = 'jwk', hash = 'SHA-512') { const [ key, wrappingKey, ] = await Promise.all([ subtle.ge... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.1274600625038147,
0.04819610342383385,
-0.007350601255893707,
0.07620464265346527,
-0.006885646376758814,
-0.05092621222138405,
0.018721187487244606,
-0.024404188618063927,
-0.025007013231515884,
-0.04608482867479324,
0.0550030916929245,
-0.06682330369949341,
0.00799520406872034,
-0.000... | -0.054566 |
------------------------------------ | -------------------------- | ------------------------ | ------------------------ | --------------------------- | | `'AES-CBC'` | β | β | β | | | `'AES-CTR'` | β | β | β | | | `'AES-GCM'` | β | β | β | | | `'AES-KW'` | β | β | β | | | `'AES-OCB'` | β | β | β | | | `'Argon2d'` | | |... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.10383020341396332,
0.10257966071367264,
-0.0994301289319992,
-0.0610402375459671,
-0.005454421043395996,
-0.07931485027074814,
0.06224001199007034,
-0.008075744844973087,
0.016590753570199013,
-0.060583073645830154,
0.11760657280683517,
-0.07628809660673141,
0.06707333028316498,
-0.0528... | 0.10218 |
| | | `'HMAC'` | | β | | | | | | `'KMAC128'`[^modern-algos] | | β | | | | | | `'KMAC256'`[^modern-algos] | | β | | | | | | `'KT128'`[^modern-algos] | | | | | | β | | `'KT256'`[^modern-algos] | | | | | | β | | `'ML-DSA-44'`[^modern-algos] | | β | | | | | | `'ML-DSA-65'`[^modern-algos] | | β | | | | | | `'ML-DSA-87'`[^mo... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.03511426970362663,
0.0523308664560318,
-0.03908434882760048,
-0.05789297819137573,
-0.008211717009544373,
-0.03300002962350845,
0.0327816866338253,
-0.02750781737267971,
-0.010421653278172016,
-0.01905805990099907,
0.11342021077871323,
-0.06918715685606003,
-0.010781665332615376,
-0.074... | 0.071602 |
Enable using the key with [`subtle.encapsulateKey()`][] \* `'decapsulateKey'` - Enable using the key with [`subtle.decapsulateKey()`][] \* `'wrapKey'` - Enable using the key with [`subtle.wrapKey()`][] \* `'unwrapKey'` - Enable using the key with [`subtle.unwrapKey()`][] Valid key usages depend on the key algorithm (id... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.08054440468549728,
0.0418391153216362,
-0.04267997667193413,
-0.00723531236872077,
0.07542166858911514,
-0.08133633434772491,
0.0508258193731308,
-0.011510947719216347,
-0.05031381919980049,
-0.045411769300699234,
0.050015754997730255,
-0.06909718364477158,
0.028397710993885994,
-0.0096... | 0.00194 |
otherwise. \* Returns: {boolean} Indicating whether the implementation supports the given operation Allows feature detection in Web Crypto API, which can be used to detect whether a given algorithm identifier (including its parameters) is supported for the given operation. See [Checking for runtime algorithm support][]... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.049731940031051636,
0.021665126085281372,
-0.020567715167999268,
0.01317504607141018,
-0.022638676688075066,
-0.10824413597583771,
0.05711726099252701,
-0.0726497620344162,
-0.024860860779881477,
-0.04791408032178879,
-0.01246851310133934,
-0.06039876863360405,
0.03577001765370369,
-0.0... | 0.148116 |
If successful, the returned promise is resolved with an {ArrayBuffer} containing the computed digest. If `algorithm` is provided as a {string}, it must be one of: \* `'cSHAKE128'`[^modern-algos] \* `'cSHAKE256'`[^modern-algos] \* `'KT128'`[^modern-algos] \* `'KT256'`[^modern-algos] \* `'SHA-1'` \* `'SHA-256'` \* `'SHA-... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.04456349462270737,
0.09090983867645264,
0.00837623793631792,
-0.023361312225461006,
-0.051543302834033966,
-0.10507939010858536,
0.0029669939540326595,
-0.09279125183820724,
-0.02099723368883133,
-0.006807431112974882,
-0.04503036290407181,
-0.0749778151512146,
0.009389578364789486,
-0.... | 0.056654 |
| `'HMAC'` | | | β | β | β | | | | `'KMAC128'`[^modern-algos] | | | β | | β | | | | `'KMAC256'`[^modern-algos] | | | β | | β | | | | `'ML-DSA-44'`[^modern-algos] | β | β | β | | | β | β | | `'ML-DSA-65'`[^modern-algos] | β | β | β | | | β | β | | `'ML-DSA-87'`[^modern-algos] | β | β | β | | | β | β | | `'ML-KEM-512'`[^... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.030840251594781876,
0.04671917110681534,
-0.0601181723177433,
-0.06673640757799149,
-0.005083038937300444,
-0.03891824930906296,
0.02255750261247158,
-0.018289122730493546,
-0.02569020353257656,
-0.021553469821810722,
0.12009125202894211,
-0.07341711223125458,
-0.001575630740262568,
-0.... | 0.058563 |
| | | β | | | | `'Argon2id'`[^modern-algos] | | | | | β | | | | `'ChaCha20-Poly1305'`[^modern-algos] | | | β | | β | | | | `'ECDH'` | β | β | β | β | | β | | | `'ECDSA'` | β | β | β | β | | β | | | `'Ed25519'` | β | β | β | β | | β | | | `'Ed448'`[^secure-curves] | β | β | β | β | | β | | | `'HKDF'` | | | | β | β | | |... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.03789885714650154,
0.0930270403623581,
-0.06888066232204437,
-0.054056357592344284,
0.0035838165786117315,
-0.05131758004426956,
0.034685809165239334,
-0.02559962123632431,
-0.01800474151968956,
-0.002733206609264016,
0.12292137742042542,
-0.06328240036964417,
0.04686041921377182,
-0.05... | 0.098527 |
algorithms supported include: \* `'AES-CBC'` \* `'AES-CTR'` \* `'AES-GCM'` \* `'AES-KW'` \* `'AES-OCB'`[^modern-algos] \* `'ChaCha20-Poly1305'`[^modern-algos] \* `'ECDH'` \* `'ECDSA'` \* `'Ed25519'` \* `'Ed448'`[^secure-curves] \* `'HMAC'` \* `'KMAC128'`[^modern-algos] \* `'KMAC256'`[^modern-algos] \* `'ML-DSA-44'`[^mo... | https://github.com/nodejs/node/blob/main/doc/api/webcrypto.md | main | nodejs | [
-0.08971305936574936,
0.04165413975715637,
-0.012769043445587158,
-0.06575023382902145,
0.0002736380265560001,
-0.09648162126541138,
0.006385755725204945,
-0.08215204626321793,
-0.06320667266845703,
-0.020663216710090637,
0.06682652980089188,
-0.051949284970760345,
0.00822487659752369,
-0.... | 0.11931 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.