MCPcopy Create free account
hub / github.com/TodePond/ScreenPond / pop

Method pop

source/list.js:36–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 }
35
36 pop() {
37 if (this.isEmpty) {
38 return undefined;
39 }
40
41 const item = this.start.item;
42 if (this.start === this.end) {
43 this.clear();
44 return item;
45 }
46
47 this.end = this.end.previous;
48 this.end.next = undefined;
49 return item;
50 }
51
52 shift() {
53 if (this.isEmpty) {

Callers 1

popStepFunction · 0.80

Calls 1

clearMethod · 0.95

Tested by

no test coverage detected