Skip to content

Commit

Permalink
🚚 Do not export mersenne as default (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz authored Sep 24, 2024
1 parent e1758c0 commit 680a672
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/generator/MersenneTwister.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function fromState(state: readonly number[]): RandomGenerator {
return MersenneTwister.fromState(state);
}

export default Object.assign(
export const mersenne = Object.assign(
function (seed: number): RandomGenerator {
return MersenneTwister.from(seed);
},
Expand Down
2 changes: 1 addition & 1 deletion src/pure-rand-default.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { RandomGenerator } from './types/RandomGenerator';
import { congruential32 } from './generator/LinearCongruential';
import mersenne from './generator/MersenneTwister';
import { mersenne } from './generator/MersenneTwister';
import { xorshift128plus } from './generator/XorShift';
import { xoroshiro128plus } from './generator/XoroShiro';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fc from 'fast-check';

import { ArrayInt } from '../../../src/distribution/internals/ArrayInt';
import { uniformArrayIntDistribution } from '../../../src/distribution/UniformArrayIntDistribution';
import mersenne from '../../../src/generator/MersenneTwister';
import { mersenne } from '../../../src/generator/MersenneTwister';
import { RandomGenerator } from '../../../src/types/RandomGenerator';

describe('uniformArrayIntDistribution [non regression]', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { uniformBigIntDistribution } from '../../../src/distribution/UniformBigIntDistribution';
import mersenne from '../../../src/generator/MersenneTwister';
import { mersenne } from '../../../src/generator/MersenneTwister';
import { RandomGenerator } from '../../../src/types/RandomGenerator';

describe('uniformBigIntDistribution [non regression]', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/distribution/UniformBigIntDistribution.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as fc from 'fast-check';

import { uniformBigIntDistribution } from '../../../src/distribution/UniformBigIntDistribution';
import { uniformIntDistribution } from '../../../src/distribution/UniformIntDistribution';
import mersenne from '../../../src/generator/MersenneTwister';
import { mersenne } from '../../../src/generator/MersenneTwister';

const bigIntArbitrary = fc
.tuple(fc.boolean(), fc.nat(0xffffffff), fc.nat(0xffffffff), fc.nat(0xffffffff), fc.nat(0xffffffff))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fc from 'fast-check';

import { uniformIntDistribution } from '../../../src/distribution/UniformIntDistribution';
import mersenne from '../../../src/generator/MersenneTwister';
import { mersenne } from '../../../src/generator/MersenneTwister';
import { RandomGenerator } from '../../../src/types/RandomGenerator';

describe('uniformIntDistribution [non regression]', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/generator/MersenneTwister.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as assert from 'assert';
import * as fc from 'fast-check';

import mersenne from '../../../src/generator/MersenneTwister';
import { mersenne } from '../../../src/generator/MersenneTwister';
import * as p from './RandomGenerator.properties';

describe('mersenne', () => {
Expand Down

0 comments on commit 680a672

Please sign in to comment.