Skip to content

cascadiacollections/randomuser

Folders and files

NameName
Last commit message
Last commit date
May 6, 2024
May 6, 2024
Jun 20, 2020
May 15, 2021
Aug 12, 2024
Sep 12, 2021
May 15, 2021
Jun 20, 2020
Jun 20, 2020
May 15, 2021
Sep 12, 2021
Sep 12, 2021
Jan 30, 2025
May 6, 2024
Feb 8, 2025

Repository files navigation

randomuser

CI npm version

A tiny NodeJS client for generating random users - https://randomuser.me.

Installation

  1. Install dependencies with yarn
  2. Build the project with yarn build
  3. Run tests with yarn test

Getting started

const RandomUser = require('randomuser');
const client = new RandomUser();

// With options
client.getUsers({ seed: "foxie", results: 5, gender: "male" }, data => {
  console.log(data);
});

// Without options
client.getUsers(data => {
  console.log(data);
});

params {Object} Documentation

  • results - number specifying number of results to return
  • genders - string - "male" or "female" specifying gender to generate
  • seed - string - service will return same data for given seed

Contributing

Feel free to contribute!