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

Function prepareWebCryptoResult

lib/internal/crypto/util.js:735–744  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

733// Returning an own undefined data property keeps that lookup from reaching
734// user-mutated prototypes.
735function prepareWebCryptoResult(value) {
736 if ((value === null || typeof value !== 'object') &&
737 typeof value !== 'function') {
738 return false;
739 }
740 if (isPromise(value) || ObjectPrototypeHasOwnProperty(value, 'then'))
741 return false;
742 setOwnProperty(value, 'then', undefined);
743 return true;
744}
745
746// Remove the temporary then property installed by prepareWebCryptoResult().
747function cleanupWebCryptoResult(value) {

Callers 2

resolveWebCryptoResultFunction · 0.85
callSubtleCryptoMethodFunction · 0.85

Calls 1

setOwnPropertyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…