npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

uniquegen

v8.6.6

Published

uniquegen is an package for Node.js projects, enabling the generation of random numbers and words. It offers flexibility and ease of use, making it a valuable tool for developers.

Downloads

527

Readme

UniqueGen

UniqueGen is an package for Node.js, It enables generating random numbers, alphanumeric and has a range of IDs.It offers flexibility and ease of use, making it a valuable tool for developers.

install size npm version License: MIT npm downloads CodeQL CircleCI

Features

  • Generate random numbers
  • Generate random words
  • Generate random symbols
  • Generate random mixed IDs

Security

UniqueGen is a secure package. It does not store any data on its server. All the data is generated on the user's system. It does not use any third-party API to generate data. It is a completely offline package.

Getting Started

To get started with UniqueGen, you must first install it in your project. You can install UniqueGen using npm or yarn. We recommend using npm.

Installation

To install UniqueGen, simply run the following command in your terminal:

npm install uniquegen@latest --save

Usage

To use UniqueGen, you must first import it into your project:

const UniqueGen = require('uniquegen'); // if you are using CommonJS
or;
import UniqueGen from 'uniquegen'; // if you are using ES6

Usage in CommonJS

const UniqueGen = require('uniquegen'); // if you are using CommonJS
or
import UniqueGen from 'uniquegen'; // if you are using ES6

const Number = UniqueGen.randomNumber( 10, true)
console.log(Number);
    output: 1234567890; // it will generate a random number of length 10 with zero in  way

const Number = UniqueGen.randomNumber( 10, false)
console.log(Number);
    output: 0123456789; // it will generate a random number of length 10 without zero in  way

const Word = UniqueGen.randomWord( 10, true)
console.log(Word);
    output: ABCDEFGHIJ; // it will generate a random word of length 10 with all alphabets in caps in  way

const Word = UniqueGen.randomWord( 10, false)
console.log(Word);
    output: abcdefghij; // it will generate a random word of length 10 with all alphabets in small in  way

const Symbol = UniqueGen.randomSymbol( 10)
console.log(Symbol);
    output: !@#$%^&***; // it will generate a random symbol of length 10 with all symbols in  way

const Mixed = UniqueGen.randomMixed( 10, false)
console.log(Mixed);
    output: abc#$%^&**; // it will generate a random mixed ID of length 10 with all alphabets in small in  way

const Mixed = UniqueGen.randomMixed( 10, true)
console.log(Mixed);
    output: ABC#$%^&**; // it will generate a random mixed ID of length 10 with all alphabets in caps in  way

Usage in ES6 way


const UniqueGen = require('uniquegen'); // if you are using CommonJS
or
import UniqueGen from 'uniquegen'; // if you are using ES6

const randomNumber = () => {
    const data = UniqueGen.randomNumber(10, true);
    console.log(data);
    output: 1234567899
}
randomNumber(); // it will generate a random number of length 10 with zero in asynchronous way

const randomNumber = () => {
    const data = UniqueGen.randomNumber(10, false);
    console.log(data);
    output: 0123456789
}
randomNumber(); // it will generate a random number of length 10 without zero in asynchronous way

const randomWord = () => {
    const data = UniqueGen.randomWord(10, true);
    console.log(data);
    output: ABCDEFGHIJ
}
randomWord(); // it will generate a random word of length 10 with all alphabets in caps in asynchronous way


const randomWord = () => {
    const data = UniqueGen.randomWord(10, false);
    console.log(data);
    output: abcdefghij
}
randomWord(); // it will generate a random word of length 10 with all alphabets in small in asynchronous way

const randomSymbol = () => {
    const data = UniqueGen.randomSymbol(10);
    console.log(data);
    output: !@#$%^&***
}
randomSymbol(); // it will generate a random symbol of length 10 with all symbols in asynchronous way

const randomMixed = () => {
    const data = UniqueGen.randomMixed(10, false);
    console.log(data);
    output: abc#$%^&**
}
randomMixed(); // it will generate a random mixed ID of length 10 with all alphabets in small in asynchronous way

const randomMixed = () => {
    const data = UniqueGen.randomMixed(10, true);
    console.log(data);
    output: ABC#$%^&**
}
randomMixed(); // it will generate a random mixed ID of length 10 with all alphabets in caps in asynchronous way

Adtional Features

  • You can set Custom Symbols, Words, Numbers & Mixed Data in third parameter of the function object.

Contributing

Ankan Saha Priya Ghosh

License

MIT

Project Status

This project is currently in development. Users can generate random numbers, words, symbols and mixed IDs in synchronous and asynchronous way. please update the package to get the latest version.

Donation

If you like my work and want to support me, you can donate me at PayPal

Thank You