npmfunkingpackage

1.0.0 • Public • Published

NPM Package

A simple utility package with basic functions for greeting, math operations, and string manipulation.

Installation

npm install npmpackage

Usage

const { greet, add, capitalize } = require('npmpackage');

// Greeting function
console.log(greet('World')); // "Hello, World!"
console.log(greet('Alice', 'Hi')); // "Hi, Alice!"

// Math function
console.log(add(5, 3)); // 8

// String manipulation
console.log(capitalize('hello world')); // "Hello World"

API

greet(name, greeting)

Greets a person with a customizable message.

  • name (string): The name of the person to greet
  • greeting (string, optional): Custom greeting message (default: "Hello")

Returns a formatted greeting string.

add(a, b)

Calculates the sum of two numbers.

  • a (number): First number
  • b (number): Second number

Returns the sum of the two numbers.

capitalize(str)

Capitalizes the first letter of each word in a string.

  • str (string): The string to capitalize

Returns the capitalized string.

Testing

npm test

License

ISC

Author

arsh

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Package Sidebar

Install

npm i npmfunkingpackage

Weekly Downloads

10

Version

1.0.0

License

ISC

Unpacked Size

3.56 kB

Total Files

3

Last publish

Collaborators

  • vkjdsbgdfhglew