A simple npm module that provides basic operations such as generating random numbers, removing spaces from strings, and retrieving the current date.
npm install not-so-useless
Generates a random number between 0 and 1. Returns: A random number.
Removes all spaces from a string and replaces them with dashes. Returns: The modified string with spaces replaced by dashes.
Retrieves the current date. Returns: The current date in the format 'MM/DD/YYYY'.
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