Multiplies a number by zero. Useful for when you need to multiply a number by zero
Please consider checking out the links of this project's author, Dheirya Tyagi, and consider starring the project to show your ❤️ and support.
Install with npm:
$ npm install --save multiply-by-zero
Works with strings, whole numbers, negative numbers, decimals, and fractions.
const multiplyByZero = require('multiply-by-zero');
console.log(multiplyByZero('1')); //=> 0
console.log(multiplyByZero('-4')); //=> 0
console.log(multiplyByZero(0.6)); //=> 0
console.log(multiplyByZero(1/3)); //=> 0
console.log(multiplyByZero('Number')); //=> Can't multiply a string by Zero
Dheirya Tyagi
- Testing
- Python Package on PyPI
Copyright © 2022, Dheirya Tyagi. Released under the MIT License.