MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / get

Function get

lib/secret.js:36–45  ·  view source on GitHub ↗
(obj, prop)

Source from the content-addressed store, hash-verified

34function secretObject(obj, fieldsToHide = []) {
35 const handler = {
36 get(obj, prop) {
37 if (prop === 'toString') {
38 return function () {
39 const maskedObject = deepClone(obj)
40 fieldsToHide.forEach(f => (maskedObject[f] = maskedString))
41 return JSON.stringify(maskedObject)
42 }
43 }
44 return fieldsToHide.includes(prop) ? new Secret(obj[prop]) : obj[prop]
45 },
46 }
47
48 return new Proxy(obj, handler)

Callers

nothing calls this directly

Calls 1

includesMethod · 0.80

Tested by

no test coverage detected