1.1.5 • Published 7 months ago

@hazae41/arrays v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Arrays

Utilities to deal with arrays

npm i @hazae41/arrays

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependency
  • Unit-tested and benchmarked
  • Get the last value
  • Get a random value using Math's PRNG
  • Get a random value using WebCrypto's CSPRNG

Usage

Arrays.last

Get the last value

import { Arrays } from "@hazae41/arrays"

const value = Arrays.last([1, 2, 3, 4, 5])

Arrays.random

Get a random value using Math's PRNG

import { Arrays } from "@hazae41/arrays"

const value = Arrays.random([1, 2, 3, 4, 5])

Arrays.cryptoRandom

Get a random value using WebCrypto's CSPRNG

import { Arrays } from "@hazae41/arrays"

const value = Arrays.cryptoRandom([1, 2, 3, 4, 5])
1.1.5

7 months ago

1.1.4

7 months ago

1.1.3

9 months ago

1.1.2

11 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago