MCPcopy Create free account
hub / github.com/braziljs/eloquente-javascript / delete

Method delete

code/solutions/07_3_persistent_group.js:12–15  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

10 }
11
12 delete(value) {
13 if (!this.has(value)) return this;
14 return new PGroup(this.#members.filter(m => m !== value));
15 }
16
17 has(value) {
18 return this.#members.includes(value);

Callers 1

Calls 2

hasMethod · 0.95
filterMethod · 0.80

Tested by

no test coverage detected