MCPcopy Create free account
hub / github.com/dataease/SQLBot / deeplyStripKey

Function deeplyStripKey

frontend/public/swagger-ui-bundle.js:31249–31258  ·  view source on GitHub ↗
(s, o, i = () => !0)

Source from the content-addressed store, hash-verified

31247 getCommonExtensions = (s) =>
31248 s.filter((s, o) => /^pattern|maxLength|minLength|maximum|minimum/.test(o))
31249 function deeplyStripKey(s, o, i = () => !0) {
31250 if ('object' != typeof s || Array.isArray(s) || null === s || !o) return s
31251 const a = Object.assign({}, s)
31252 return (
31253 Object.keys(a).forEach((s) => {
31254 s === o && i(a[s], s) ? delete a[s] : (a[s] = deeplyStripKey(a[s], o, i))
31255 }),
31256 a
31257 )
31258 }
31259 function stringify(s) {
31260 if ('string' == typeof s) return s
31261 if ((s && s.toJS && (s = s.toJS()), 'object' == typeof s && null !== s))

Callers 1

sanitizeRefFunction · 0.85

Calls 4

iFunction · 0.70
isArrayMethod · 0.45
forEachMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected