fraction.js
Advanced tools
| /* | ||
| Fraction.js v5.3.3 8/22/2025 | ||
| Fraction.js v5.3.4 8/22/2025 | ||
| https://raw.org/article/rational-numbers-in-javascript/ | ||
@@ -4,0 +4,0 @@ |
+14
-20
@@ -1,5 +0,1 @@ | ||
| /** | ||
| * CommonJS type definitions for Fraction. | ||
| */ | ||
| declare class Fraction { | ||
@@ -52,18 +48,8 @@ constructor(); | ||
| static default: typeof Fraction; | ||
| static Fraction: typeof Fraction; | ||
| static default: typeof Fraction; | ||
| } | ||
| declare namespace Fraction { | ||
| /** | ||
| * Interface representing a fraction with numerator and denominator. | ||
| */ | ||
| interface NumeratorDenominator { | ||
| n: number | bigint; | ||
| d: number | bigint; | ||
| } | ||
| /** | ||
| * Type for handling multiple types of input for Fraction operations. | ||
| */ | ||
| interface NumeratorDenominator { n: number | bigint; d: number | bigint; } | ||
| type FractionInput = | ||
@@ -77,5 +63,2 @@ | Fraction | ||
| /** | ||
| * Function signature for Fraction operations like add, sub, mul, etc. | ||
| */ | ||
| type FractionParam = { | ||
@@ -87,2 +70,13 @@ (numerator: number | bigint, denominator: number | bigint): Fraction; | ||
| export = Fraction; | ||
| /** | ||
| * Export matches CJS runtime: | ||
| * module.exports = Fraction; | ||
| * module.exports.default = Fraction; | ||
| * module.exports.Fraction = Fraction; | ||
| */ | ||
| declare const FractionExport: typeof Fraction & { | ||
| default: typeof Fraction; | ||
| Fraction: typeof Fraction; | ||
| }; | ||
| export = FractionExport; |
+6
-3
| { | ||
| "name": "fraction.js", | ||
| "title": "Fraction.js", | ||
| "version": "5.3.3", | ||
| "version": "5.3.4", | ||
| "description": "The RAW rational numbers library", | ||
@@ -34,3 +34,6 @@ "homepage": "https://raw.org/article/rational-numbers-in-javascript/", | ||
| ".": { | ||
| "types": "./fraction.d.mts", | ||
| "types": { | ||
| "import": "./fraction.d.mts", | ||
| "require": "./fraction.d.ts" | ||
| }, | ||
| "import": "./dist/fraction.mjs", | ||
@@ -79,2 +82,2 @@ "require": "./dist/fraction.js", | ||
| } | ||
| } | ||
| } |
+1
-1
| /** | ||
| * @license Fraction.js v5.3.3 8/22/2025 | ||
| * @license Fraction.js v5.3.4 8/22/2025 | ||
| * https://raw.org/article/rational-numbers-in-javascript/ | ||
@@ -4,0 +4,0 @@ * |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
147709
0.01%7
-12.5%4720
-0.11%