1.0.0 • Published 2 years ago

not-so-useless v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Not-so-useless

npm version

A simple npm module that provides basic operations such as generating random numbers, removing spaces from strings, and retrieving the current date.

Installation

npm install not-so-useless

Description

randomNumber()

Generates a random number between 0 and 1. Returns: A random number.

removeSpaces(input)

Removes all spaces from a string and replaces them with dashes. Returns: The modified string with spaces replaced by dashes.

todayDate()

Retrieves the current date. Returns: The current date in the format 'MM/DD/YYYY'.

Example

const { randomNumber, removeSpaces, todayDate } = require('my-basic-operations-module');

const number = randomNumber();
console.log(number); // 0.8775535436366

const input = 'Hello World!';
const modifiedInput = removeSpaces(input);
console.log(modifiedInput); // hello-world!

const date = todayDate();
console.log(date); //2023-08-22
1.0.0

2 years ago