Skip to content

Xoroshiro128plusGenerator

Extends

Methods

[dispose]()

Call Signature

[dispose](): void

Returns

void

Inherited from

Generator.[dispose]

Call Signature

[dispose](): void

Returns

void

Inherited from

Generator.[dispose]


[iterator]()

[iterator](): Generator<bigint, bigint>

Returns

Generator<bigint, bigint>

Inherited from

Generator.[iterator]


clone()

clone(): RandomGenerator

Returns

RandomGenerator

Inherited from

RandomGenerator.clone


drop()

drop(count): IteratorObject<bigint, undefined>

Creates an iterator whose values are the values from this iterator after skipping the provided count.

Parameters

count

number

The number of values to drop.

Returns

IteratorObject<bigint, undefined>

Inherited from

Generator.drop


every()

every(predicate): boolean

Determines whether all the members of this iterator satisfy the specified test.

Parameters

predicate

(value, index) => unknown

A function that accepts up to two arguments. The every method calls the predicate function for each element in this iterator until the predicate returns false, or until the end of this iterator.

Returns

boolean

Inherited from

Generator.every


filter()

Call Signature

filter<S>(predicate): IteratorObject<S, undefined>

Creates an iterator whose values are those from this iterator for which the provided predicate returns true.

Type Parameters

S extends bigint

Parameters
predicate

(value, index) => value is S

A function that accepts up to two arguments to be used to test values from the underlying iterator.

Returns

IteratorObject<S, undefined>

Inherited from

Generator.filter

Call Signature

filter(predicate): IteratorObject<bigint, undefined>

Creates an iterator whose values are those from this iterator for which the provided predicate returns true.

Parameters
predicate

(value, index) => unknown

A function that accepts up to two arguments to be used to test values from the underlying iterator.

Returns

IteratorObject<bigint, undefined>

Inherited from

Generator.filter


find()

Call Signature

find<S>(predicate): undefined | S

Returns the value of the first element in this iterator where predicate is true, and undefined otherwise.

Type Parameters

S extends bigint

Parameters
predicate

(value, index) => value is S

find calls predicate once for each element of this iterator, in order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

Returns

undefined | S

Inherited from

Generator.find

Call Signature

find(predicate): undefined | bigint

Parameters
predicate

(value, index) => unknown

Returns

undefined | bigint

Inherited from

Generator.find


flatMap()

flatMap<U>(callback): IteratorObject<U, undefined>

Creates an iterator whose values are the result of applying the callback to the values from this iterator and then flattening the resulting iterators or iterables.

Type Parameters

U

Parameters

callback

(value, index) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined>

A function that accepts up to two arguments to be used to transform values from the underlying iterator into new iterators or iterables to be flattened into the result.

Returns

IteratorObject<U, undefined>

Inherited from

Generator.flatMap


forEach()

forEach(callbackfn): void

Performs the specified action for each element in the iterator.

Parameters

callbackfn

(value, index) => void

A function that accepts up to two arguments. forEach calls the callbackfn function one time for each element in the iterator.

Returns

void

Inherited from

Generator.forEach


jump()

jump(): void

Returns

void

Inherited from

RandomGenerator.jump


map()

map<U>(callbackfn): IteratorObject<U, undefined>

Creates an iterator whose values are the result of applying the callback to the values from this iterator.

Type Parameters

U

Parameters

callbackfn

(value, index) => U

A function that accepts up to two arguments to be used to transform values from the underlying iterator.

Returns

IteratorObject<U, undefined>

Inherited from

Generator.map


next()

next(…__namedParameters): IteratorResult<bigint, bigint>

Parameters

__namedParameters

[] | [any]

Returns

IteratorResult<bigint, bigint>

Inherited from

Generator.next


reduce()

Call Signature

reduce(callbackfn): bigint

Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Parameters
callbackfn

(previousValue, currentValue, currentIndex) => bigint

A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.

Returns

bigint

Inherited from

Generator.reduce

Call Signature

reduce(callbackfn, initialValue): bigint

Parameters
callbackfn

(previousValue, currentValue, currentIndex) => bigint

initialValue

bigint

Returns

bigint

Inherited from

Generator.reduce

Call Signature

reduce<U>(callbackfn, initialValue): U

Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Type Parameters

U

Parameters
callbackfn

(previousValue, currentValue, currentIndex) => U

A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.

initialValue

U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of a value from the iterator.

Returns

U

Inherited from

Generator.reduce


return()

return(value): IteratorResult<bigint, bigint>

Parameters

value

bigint

Returns

IteratorResult<bigint, bigint>

Inherited from

Generator.return


sample()

sample(): number

Returns

number

Inherited from

RandomGenerator.sample


some()

some(predicate): boolean

Determines whether the specified callback function returns true for any element of this iterator.

Parameters

predicate

(value, index) => unknown

A function that accepts up to two arguments. The some method calls the predicate function for each element in this iterator until the predicate returns a value true, or until the end of the iterator.

Returns

boolean

Inherited from

Generator.some


take()

take(limit): IteratorObject<bigint, undefined>

Creates an iterator whose values are the values from this iterator, stopping once the provided limit is reached.

Parameters

limit

number

The maximum number of values to yield.

Returns

IteratorObject<bigint, undefined>

Inherited from

Generator.take


throw()

throw(e): IteratorResult<bigint, bigint>

Parameters

e

any

Returns

IteratorResult<bigint, bigint>

Inherited from

Generator.throw


toArray()

toArray(): bigint[]

Creates a new array from the values yielded by this iterator.

Returns

bigint[]

Inherited from

Generator.toArray

Properties

[toStringTag]

readonly [toStringTag]: string

Inherited from

Generator.[toStringTag]