1. shuffle-seed
Shuffle Array based on a Seed
shuffle-seed
Package: shuffle-seed
Created by: webcaetano
Last modified: Sun, 26 Jun 2022 19:12:03 GMT
Version: 1.1.6
License: MIT
Downloads: 286,296
Repository: https://github.com/webcaetano/shuffle-seed

Install

npm install shuffle-seed
yarn add shuffle-seed

shuffle-seed npm travis filesize

Nodejs module to Shuffle an Array with seed :seedling:

Array Shuffle Seed based on module davidbau/seedrandom

Installation

npm install shuffle-seed

Usage :

 var shuffleSeed = require('shuffle-seed');
var a = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
var resp = shuffleSeed.shuffle(a,"Kappa");
// result always will be [f','y','p','i','r','v','a','x','q','e','c','b','n','j','t','z','o','l','w','m','k','g','h','u','d','s']

shuffleSeed.unshuffle(resp,"Kappa");
// result ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

npm


The MIT License

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code