MCPcopy Create free account
hub / github.com/chavyleung/scripts / update

Function update

box/chavy.boxjs.js:1052–1064  ·  view source on GitHub ↗
(obj, path, value)

Source from the content-addressed store, hash-verified

1050}
1051
1052function update(obj, path, value) {
1053 const keys = path.split('.')
1054 let current = obj
1055
1056 for (let i = 0; i < keys.length - 1; i++) {
1057 if (!current[keys[i]]) {
1058 current[keys[i]] = {}
1059 }
1060 current = current[keys[i]]
1061 }
1062
1063 current[keys[keys.length - 1]] = value
1064}
1065
1066// 自定义并发控制函数
1067async function limitConcurrency(tasks, limit) {

Callers 1

apiUpdateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected