New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

randomuser

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

randomuser

A Simple Node.js Library for the https://randomuser.me REST API

latest
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

randomuser

CI npm version

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

Installation

  • Install dependencies with yarn
  • Build the project with yarn build
  • 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!

Keywords

random

FAQs

Package last updated on 22 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts