You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@formatjs/ecma402-abstract

Package Overview
Dependencies
Maintainers
3
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/ecma402-abstract - npm Package Compare versions

Comparing version
3.1.2
to
3.2.0
+1
-1
262.d.ts

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
/**

@@ -3,0 +3,0 @@ * https://tc39.es/ecma262/#sec-tostring

+1
-1

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
import { ZERO } from "./constants.js";

@@ -3,0 +3,0 @@ import { invariant } from "./utils.js";

@@ -1,4 +0,4 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
export declare const TEN: Decimal;
export declare const ZERO: Decimal;
export declare const NEGATIVE_ZERO: Decimal;

@@ -1,4 +0,4 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
export const TEN = new Decimal(10);
export const ZERO = new Decimal(0);
export const NEGATIVE_ZERO = new Decimal(-0);

@@ -1,3 +0,3 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type UnsignedRoundingModeType } from "../types/number.js";
export declare function ApplyUnsignedRoundingMode(x: Decimal, r1: Decimal, r2: Decimal, unsignedRoundingMode: UnsignedRoundingModeType): Decimal;

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatInternal } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
import "../types/number.js";

@@ -3,0 +3,0 @@ import { ComputeExponentForMagnitude } from "./ComputeExponentForMagnitude.js";

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatInternal } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

@@ -1,6 +0,4 @@

import { Decimal } from "decimal.js";
import "../types/number.js";
import { invariant } from "../utils.js";
import { getPowerOf10 } from "./decimal-cache.js";
Decimal.set({ toExpPos: 100 });
/**

@@ -7,0 +5,0 @@ * The abstract operation ComputeExponentForMagnitude computes an exponent by which to scale a

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
/**

@@ -3,0 +3,0 @@ * Cached function to compute powers of 10 for Decimal.js operations.

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
import { memoize } from "@formatjs/fast-memoize";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatLocaleInternalData, type NumberFormatOptionsCompactDisplay, type NumberFormatOptionsCurrencyDisplay, type NumberFormatOptionsCurrencySign, type NumberFormatOptionsNotation, type NumberFormatOptionsStyle, type NumberFormatOptionsUnitDisplay, type NumberFormatPart, type RoundingModeType, type UseGroupingType } from "../types/number.js";

@@ -3,0 +3,0 @@ interface NumberResult {

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
import { S_UNICODE_REGEX } from "../regex.generated.js";

@@ -3,0 +3,0 @@ import "../types/number.js";

@@ -1,3 +0,3 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatInternal } from "../types/number.js";
export declare function FormatNumeric(internalSlots: NumberFormatInternal, x: Decimal): string;

@@ -1,2 +0,2 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatInternal } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatInternal, type NumberRangeToParts } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatInternal, type NumberFormatPart } from "../types/number.js";

@@ -3,0 +3,0 @@ export declare function FormatNumericToParts(nf: Intl.NumberFormat, x: Decimal, implDetails: {

@@ -1,2 +0,2 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatDigitInternalSlots } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatInternal, type NumberFormatPart } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type NumberFormatInternal, type NumberFormatPart } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type RawNumberFormatResult, type UnsignedRoundingModeType } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,1 @@

import { Decimal } from "decimal.js";
import "../types/number.js";

@@ -6,4 +5,2 @@ import { repeat } from "../utils.js";

import { getPowerOf10 } from "./decimal-cache.js";
//IMPL: Setting Decimal configuration
Decimal.set({ toExpPos: 100 });
//IMPL: Helper function to calculate raw fixed value

@@ -10,0 +7,0 @@ function ToRawFixedFn(n, f) {

@@ -1,2 +0,2 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type RawNumberFormatResult, type UnsignedRoundingModeType } from "../types/number.js";

@@ -3,0 +3,0 @@ /**

{
"name": "@formatjs/ecma402-abstract",
"description": "A collection of implementation for ECMAScript abstract operations",
"version": "3.1.2",
"version": "3.2.0",
"license": "MIT",

@@ -14,3 +14,3 @@ "author": "Long Ho <holevietlong@gmail.com",

"dependencies": {
"decimal.js": "^10.6.0",
"@formatjs/bigdecimal": "0.2.0",
"@formatjs/fast-memoize": "3.1.1",

@@ -17,0 +17,0 @@ "@formatjs/intl-localematcher": "0.8.2"

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
/**

@@ -3,0 +3,0 @@ * https://tc39.es/ecma402/#sec-tointlmathematicalvalue

@@ -1,2 +0,2 @@

import { Decimal } from "decimal.js";
import { Decimal } from "@formatjs/bigdecimal";
import { ToPrimitive } from "./262.js";

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import type { Decimal } from "decimal.js";
import type { Decimal } from "@formatjs/bigdecimal";
import { type LocaleData } from "./core.js";

@@ -3,0 +3,0 @@ import { type LDMLPluralRule } from "./plural-rules.js";