(existing, fresh)
| 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 = [] |
no test coverage detected