not-so-useless

1.0.0 • Public • Published

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.01latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.01

Package Sidebar

Install

npm i not-so-useless

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

1.81 kB

Total Files

3

Last publish

Collaborators

  • eli-90