MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / Big

Function Big

projects/JavaScript/proto/big.js:92–112  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

90 * n {number|string|Big} A numeric value.
91 */
92 function Big(n) {
93 var x = this;
94
95 // Enable constructor usage without new.
96 if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);
97
98 // Duplicate.
99 if (n instanceof Big) {
100 x.s = n.s;
101 x.e = n.e;
102 x.c = n.c.slice();
103 } else {
104 parse(x, n);
105 }
106
107 /*
108 * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which
109 * points to Object.
110 */
111 x.constructor = Big;
112 }
113
114 Big.prototype = P;
115 Big.DP = DP;

Callers

nothing calls this directly

Calls 2

_Big_Function · 0.85
parseFunction · 0.85

Tested by

no test coverage detected