1.0.1 • Published 11 months ago

my-first-unique-npm-repository v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

my-first-unique-npm-repository

A simple and useful utility library providing common string manipulations, number generation, and other handy functions.

Features

This package provides the following utility functions:

  • sayHello(name): Returns a greeting string for the provided name.
  • randomNumber(min, max): Generates a random integer between the provided min and max values.
  • reverseString(str): Reverses the provided string.
  • toTitleCase(str): Converts the provided string to title case.
  • isPrime(num): Checks if the provided number is prime.

Installation

You can install the package using NPM:

npm install npm-repository

Usage

Here are examples of how to use each function provided by the package:

1. sayHello(name)

const { sayHello } = require('npm-repository');

console.log(sayHello('World')); // Output: Hello, World!

2. randomNumber(min, max)

const { randomNumber } = require('npm-repository');

console.log(randomNumber(1, 10)); // Output: A random number between 1 and 10

3. reverseString(str)

const { reverseString } = require('npm-repository');

console.log(reverseString('JavaScript')); // Output: tpircSavaJ

4. toTitleCase(str)

const { toTitleCase } = require('npm-repository');

console.log(toTitleCase('openAI is amazing')); // Output: Openai Is Amazing

5. isPrime(num)

const { isPrime } = require('npm-repository');

console.log(isPrime(29)); // Output: true

License

This project is licensed under the ISC License.

Contributing

Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.

Issues

If you encounter any issues, please report them here.

Author

Developed by Sachin Kumar.

1.0.1

11 months ago

1.0.0

11 months ago