Skip to content

preyan/rand-name-gen

Repository files navigation

Random Name GEnerator

NPM Version license: MIT Downloads

Logo

Description

rand-name-gen is a simple and lightweight npm package for generating random names.

Installation

Install the package with npm:

npm install rand-name-gen

Usage

const rand = require("rand-name-gen"); console.log(rand.randomName()); // Output: { 'John Doe' } console.log(rand.randomName({ title: true })); // Output: { 'Mr. John Doe' } console.log(rand.randomName({ firstName: true })); // Output: { 'John' } console.log(rand.randomName({ lastName: true })); // Output: { 'Doe' }

OR

import { randomName } from "rand-name-gen"; console.log(randomName({ firstName: true, lastName: true })); // Output: { 'John Doe' } console.log(randomName({ title: true, firstName: true })); // Output: { 'Mr. John' } console.log(randomName({ title: true, firstName: true, lastName: true })); // Output: { 'Mr. John Doe' }

API

  • randomName()

License

This project is licensed under the MIT License.

Author

Preyan Bhowmick

About

Nothing to see here. Just a trial package to test pkg publishing in npm and jsr.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •