user-harvest
v1.0.4
Published
code base for user-harvest
Downloads
10
Maintainers
Keywords
Readme
User Harvest
User Harvest is a Node.js package that enables you to generate random user data, including names, email addresses, birthdates, occupations, and profile pictures. It fetches profile pictures from Unsplash based on the specified gender.
Table of Contents
Installation
To install User Harvest, follow these steps:
Clone the repository:
git clone https://github.com/ShubhKakkar/user-harvest.git
a. Navigate to the project directory:
cd user-harvest
b. Install the required dependencies:
npm install
Usage
Generate Random User Data To generate random user data, you can use the generateRandomUser function provided by the package. Here's an example of how to use it:
const generateRandomUser = require('user-harvest');
// Specify the gender and limit
generateRandomUser('male', 5).then((result) => {
console.log(result);
});
Note:
The gender can be either "male" or "female." The limit specifies the number of user profiles to generate, with a maximum limit of 100. User Object Structure The generated user object includes the following fields:
fullName: Full name of the user. username: Unique username. password: Randomly generated password. email: Randomly generated email address. birthDate: Randomly generated birthdate. occupation: Randomly selected occupation. profilePicture: URL of the profile picture fetched from Unsplash. Features Generates random user data with customizable gender and limit. Fetches profile pictures from Unsplash for a realistic touch. Provides a variety of user data fields. Examples Here are some additional examples of how to use User Harvest:
// Generate 3 female user profiles
const femaleUsers = await generateRandomUser('female', 3);
console.log(femaleUsers);
// Generate 10 male user profiles
const maleUsers = await generateRandomUser('male', 10);
console.log(maleUsers);
Contributing Contributions are welcome! Follow the Contribution Guidelines when making contributions to this project.
License This project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE - see the LICENSE file for details.
Feel free to use or modify this version according to your needs!