Socket
Socket
Sign inDemoInstall

@hazae41/arrays

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hazae41/arrays

Utilities to deal with arrays


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
14.8 kB
Created
Weekly downloads
 

Readme

Source

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])

Keywords

FAQs

Last updated on 09 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc