1.2.1 • Published 2 years ago

rand-id-gen v1.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Installation

$ npm install rand-id-gen --save

Example

const randIdGen = require("rand-id-gen")

// random word with default 16 word length
let id = randIdGen()

// to specify your own length
let id = randIdGen({
  length: 10
})

// to compare with items in array and result in unique word
let items = [...myList]
let id = randIdGen({
	array: items
})

Options

You can pass options to manipulate the generation with your preference.
OptionTypeDefaultDesciption
lengthInteger16Length of the word
arrayArray\undefinedSet of strings for comparision
mixNumbersBooleanfalseIncludes numbers in the word
onlyNumbersBooleanfalseFlag to make the generated word

Features

* Random word (id) generation
* Comparision with set of words
1.2.1

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago