MCPcopy Index your code
hub / github.com/marijnh/Eloquent-JavaScript / add

Method add

code/solutions/06_2_groups.js:4–8  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

2 #members = [];
3
4 add(value) {
5 if (!this.has(value)) {
6 this.#members.push(value);
7 }
8 }
9
10 delete(value) {
11 this.#members = this.#members.filter(v => v !== value);

Callers 6

fromMethod · 0.95
chapter_info.mjsFile · 0.45
06_2_groups.jsFile · 0.45
findPath_setFunction · 0.45
findPath_listFunction · 0.45
addEdgeMethod · 0.45

Calls 1

hasMethod · 0.95

Tested by

no test coverage detected