MCPcopy Index your code
hub / github.com/dataease/SQLBot / deepFreeze

Function deepFreeze

frontend/public/swagger-ui-bundle.js:20205–20228  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

20203 },
20204 45981: (s) => {
20205 function deepFreeze(s) {
20206 return (
20207 s instanceof Map
20208 ? (s.clear =
20209 s.delete =
20210 s.set =
20211 function () {
20212 throw new Error('map is read-only')
20213 })
20214 : s instanceof Set &&
20215 (s.add =
20216 s.clear =
20217 s.delete =
20218 function () {
20219 throw new Error('set is read-only')
20220 }),
20221 Object.freeze(s),
20222 Object.getOwnPropertyNames(s).forEach(function (o) {
20223 var i = s[o]
20224 'object' != typeof i || Object.isFrozen(i) || deepFreeze(i)
20225 }),
20226 s
20227 )
20228 }
20229 var o = deepFreeze,
20230 i = deepFreeze
20231 o.default = i

Callers

nothing calls this directly

Calls 3

freezeMethod · 0.80
isFrozenMethod · 0.80
forEachMethod · 0.45

Tested by

no test coverage detected