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

numberizer

v1.0.6

Published

This package is a random number generator optimized to be fast and functional.

Downloads

5

Readme

Numberizer Build Status

Generate controlled random numbers with this package quickly and safely. Allowing you to assign the length of numbers you want to generate. Convert integers to binary by passing the number as a parameter.

Installation

npm install numberizer

Usage

Generic Random Sync

const numberizer = require('numberizer');

let amount1 = numberizer.GenericRandom(1);
// result: number between 0 and 9
let amount2 = numberizer.GenericRandom(2);
// result: number between 00 and 99
let amount3 = numberizer.GenericRandom(3);
// result: number between 000 and 999

// 18 is the max number of digits

const { GenericRandom } = require('numberizer');

let amount1 = GenericRandom(1);
// result: number between 0 and 9
let amount2 = GenericRandom(2);
// result: number between 00 and 99
let amount3 = GenericRandom(3);
// result: number between 000 and 999

// 18 is the max number of digits

Generic Random Async

const numberizer = require('numberizer');

async function asyncGeneric() {
    let amount1 = await numberizer.GenericRandomAsync(1);
    // result: number between 0 and 9
    let amount2 = await numberizer.GenericRandomAsync(2);
    // result: number between 00 and 99
    let amount3 = await numberizer.GenericRandomAsync(3);
    // result: number between 000 and 999

    // 18 is the max number of digits
};

const { GenericRandomAsync } = require('numberizer');

const asyncGeneric = async () => {
    let amount1 = await GenericRandomAsync(1);
    // result: number between 0 and 9
    let amount2 = await GenericRandomAsync(2);
    // result: number between 00 and 99
    let amount3 = await GenericRandomAsync(3);
    // result: number between 000 and 999

    // 18 is the max number of digits
};

Parameters: 1 => 18

If no parameters are passed, it will return a default 8 digits number.


Number to Binary Sync

const numberizer = require('numberizer');

let numberToBinary = numberizer.NumberToBinary(123);
// result: 00000000000000000000000001111011

let numberToBinarySplit = numberizer.NumberToBinary(123, true);
// result: 00000000 00000000 00000000 01111011
const { NumberToBinary } = require('numberizer');

let numberToBinary = NumberToBinary(123);
// result: 00000000000000000000000001111011

let numberToBinarySplit = NumberToBinary(123, true);
// result: 00000000 00000000 00000000 01111011

Number to Binary Async

const numberizer = require('numberizer');

async function numberToBinary() {
    let numberToBinary = await numberizer.NumberToBinary(123);
    // result: 00000000000000000000000001111011
    
    let numberToBinarySplit = await numberizer.NumberToBinary(123, true);
    // result: 00000000 00000000 00000000 01111011
}
const { NumberToBinary } = require('numberizer');

const numberToBinary = async () => {
    let numberToBinary = await NumberToBinary(123);
    // result: 00000000000000000000000001111011
    
    let numberToBinarySplit = await NumberToBinary(123, true);
    // result: 00000000 00000000 00000000 01111011
}

Passworizer Project By Emiliano Kosh

https://www.npmjs.com/package/passworizer

Thanks

Feel free to contribute to the proyect.