MCPcopy Index your code
hub / github.com/nodejs/node / structuredClone

Function structuredClone

lib/internal/worker/js_transferable.js:113–129  ·  view source on GitHub ↗
(value, options)

Source from the content-addressed store, hash-verified

111 );
112
113function structuredClone(value, options) {
114 if (arguments.length === 0) {
115 throw new ERR_MISSING_ARGS('The value argument must be specified');
116 }
117
118 const idlOptions = webidl.converters.StructuredSerializeOptions(
119 options,
120 {
121 __proto__: null,
122 prefix: "Failed to execute 'structuredClone'",
123 context: 'Options',
124 },
125 );
126
127 const serializedData = nativeStructuredClone(value, idlOptions);
128 return serializedData;
129}
130
131module.exports = {
132 markTransferMode,

Callers 15

[kChunk]Function · 0.85
constructorMethod · 0.85
measureFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
test-blob.jsFile · 0.85
checkHmacKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected