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

Method __ensureOwner

src/Stack.js:144–157  ·  view source on GitHub ↗
(ownerID)

Source from the content-addressed store, hash-verified

142 // @pragma Mutability
143
144 __ensureOwner(ownerID) {
145 if (ownerID === this.__ownerID) {
146 return this;
147 }
148 if (!ownerID) {
149 if (this.size === 0) {
150 return emptyStack();
151 }
152 this.__ownerID = ownerID;
153 this.__altered = false;
154 return this;
155 }
156 return makeStack(this.size, this._head, ownerID, this.__hash);
157 }
158
159 // @pragma Iteration
160

Callers

nothing calls this directly

Calls 2

emptyStackFunction · 0.85
makeStackFunction · 0.85

Tested by

no test coverage detected