MCPcopy Index your code
hub / github.com/immutable-js/immutable-js / clear

Method clear

src/Stack.js:103–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101 }
102
103 clear() {
104 if (this.size === 0) {
105 return this;
106 }
107 if (this.__ownerID) {
108 this.size = 0;
109 this._head = undefined;
110 this.__hash = undefined;
111 this.__altered = true;
112 return this;
113 }
114 return emptyStack();
115 }
116
117 slice(begin, end) {
118 if (wholeSlice(begin, end, this.size)) {

Callers

nothing calls this directly

Calls 1

emptyStackFunction · 0.85

Tested by

no test coverage detected