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

h2randomizer

v1.0.7

Published

A utility that provides methods to get random data such as first name, last name, or a city according to its zipcode listing.

Downloads

7

Readme

#H2Wellness Developer's Randomizer The H2Wellness Developer's Randomizer is a small NodeJS utility module the publishes methods that provide often used data in a random manner.

Development of this project is supported by H2Wellness.com.

Installation

npm install h2randomizer

##Usage

var randomizer = require("h2randomizer");

###Random First Name

var str = randomizer.getRandomFirstNameSync();

output Brock

###Random Last Name

var str = randomizer.getRandomLastNameSync();

output Acosto

###Random City Object Each city is based on real zip code information provided by the USPS.

var o = randomizer.getRandomCitySync();

output {"postalcode":"63112","city":"Saint Louis","state":"MO","longitude":"38.63","latitude":"-90.24"}

###Random Address One

var str = randomizer.getRandomAddressOneSync();

output 29 Monroe St.

###Random Address Two

var str = randomizer.getRandomAddressTwoSync();

output Mailstop 60

###Random Gender

var str = randomizer.getRandomGenderSync();

output male

###Random Email Domain

var str = randomizer.getRandomEmailDomainSync();

output git.com

###Random Password

var str = randomizer.getRandomPasswordSync();

output 6c24b952-8c22-4c24-abc2-cbc0e5cc7a94

###Random Boolean

var b = randomizer.getRandomBooleanSync();

output false

###Random Date randomizer.getRandomDateSync(startDate, endDate)

var d = randomizer.getRandomDateSync(new Date("11/12/1998"),new Date());

output Tue Mar 11 2014 00:25:26 GMT-0700 (PDT)

###Random Callback URL

var str = randomizer.getRandomCallbackUrlSync();

output http://www.BirchSharron.com/services/

###Random Phone Number

var str = randomizer.getRandomPhoneNumberUsaSync();

output 8627224951

###Random Description The method take one parameter, numberOfWords , which indicates the number of words to put in the description. If you leave the parameter null, the default is 10 words.

var str = randomizer.getRandomDescriptionSync(4);

output duncify undergaoler nawab thiosinamine

###Get Random Number Between Min and Max, Inclusive This method allows you get a randon number between a minimum and maximum value inclusively. The minimum value must be at least 1. The maximum value must be greater than the minimum value.

var i,j;
i = 2;
j = 10;
var num = randomizer.getRandomIntInclusiveSync(i, j);

output 9

An error is thrown when the min or max value is missing, when the min equals the max value or when the max value is less than the min value.