MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / lodash_set

Method lodash_set

env/env.js:160–171  ·  view source on GitHub ↗
(t, e, s)

Source from the content-addressed store, hash-verified

158 return r
159 }
160 lodash_set(t, e, s) {
161 return Object(t) !== t
162 ? t
163 : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []),
164 (e
165 .slice(0, -1)
166 .reduce(
167 (t, s, a) => (Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {})),
168 t
169 )[e[e.length - 1]] = s),
170 t)
171 }
172 getdata(t) {
173 let e = this.getval(t)
174 if (/^@/.test(t)) {

Callers 1

setdataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected