MCPcopy
hub / github.com/gitcoinco/web / replace

Method replace

app/assets/v2/js/ipfs-api.js:48255–48264  ·  view source on GitHub ↗
(existing, fresh)

Source from the content-addressed store, hash-verified

48253
48254 // replaces selected existing multiaddrs with new ones
48255 replace (existing, fresh) {
48256 if (!Array.isArray(existing)) {
48257 existing = [existing]
48258 }
48259 if (!Array.isArray(fresh)) {
48260 fresh = [fresh]
48261 }
48262 existing.forEach((m) => this.delete(m))
48263 fresh.forEach((m) => this.add(m))
48264 }
48265
48266 clear () {
48267 this._multiaddrs = []

Callers 15

viz_sunburstFunction · 0.80
get_gh_issue_detailsFunction · 0.80
get_userFunction · 0.80
handleMethod · 0.80
bFunction · 0.80
fFunction · 0.80
bFunction · 0.80
avatar_builder.jsFile · 0.80

Calls 3

deleteMethod · 0.95
addMethod · 0.95
forEachMethod · 0.80

Tested by

no test coverage detected