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

Method constructor

src/Stack.js:15–22  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

13 // @pragma Construction
14
15 constructor(value) {
16 // eslint-disable-next-line no-constructor-return
17 return value === undefined || value === null
18 ? emptyStack()
19 : isStack(value)
20 ? value
21 : emptyStack().pushAll(value);
22 }
23
24 static of(/*...values*/) {
25 return this(arguments);

Callers

nothing calls this directly

Calls 3

isStackFunction · 0.90
emptyStackFunction · 0.85
pushAllMethod · 0.65

Tested by

no test coverage detected