Socket
Socket
Sign inDemoInstall

ts-shuffle

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ts-shuffle

An *incredibly modular & complex package* to shuffle the contents of a given array randomly.


Version published
Weekly downloads
6
increased by500%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

🪙 ts-shuffle

An incredibly modular & complex package to shuffle the contents of a given array randomly.

Install

npm i ts-shuffle
# or
yarn add ts-shuffle

Use

import { shuffle } from "ts-shuffle";

const arr: number[] = [2, 11, 37, 42];

shuffle(arr);

// Log the shuffled array (ex. [11, 42, 37, 2]):
console.log(arr);

The shuffle function takes in a parameter type of any[], meaning that as long as it is an array, the shuffling process will work. :)

Built and maintained with ❤️ by @FilippoFonseca.

FAQs

Last updated on 07 Aug 2021

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