Skip to content

AnasOnGit/get-unique-random-number-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Unique Index From Array

Get UNIQUE and RANDOM index from the array.

Installation

npm install get-unique-random-number-array

P.S. I know it's a long package name ;p

Usage

import { uniqueMultiRandomIndexFromArray } from "get-unique-random-number-array;

let arr = ["apple","Samsung","orange","MI","Banana"];

uniqueMultiRandomIndexFromArray(array,how many unique index needed, previous unique index array);

uniqueMultiRandomIndexFromArray(arr,2,[] );  // return [0,2];
uniqueMultiRandomIndexFromArray(arr,2,[0,2] );  // return [1,3];

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

About

This package was developed for personal use. It might help someone else.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published