MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeNormalizedUnsafe

Function makeNormalizedUnsafe

packages/effect/src/BigDecimal.ts:147–155  ·  view source on GitHub ↗
(value: bigint, scale: number)

Source from the content-addressed store, hash-verified

145 * @internal
146 */
147export const makeNormalizedUnsafe = (value: bigint, scale: number): BigDecimal => {
148 if (value !== bigint0 && value % bigint10 === bigint0) {
149 throw new RangeError("Value must be normalized")
150 }
151
152 const o = make(value, scale)
153 o.normalized = o
154 return o
155}
156
157const bigint0 = BigInt(0)
158const bigint1 = BigInt(1)

Callers 2

BigDecimal.tsFile · 0.85
normalizeFunction · 0.85

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected