multiply-by-zero

1.0.2 • Public • Published

multiply-by-zero npm npm bundle size GitHub repo file count GitHub Twitter

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

Install with npm:

$ npm install --save multiply-by-zero

Usage

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

About

Author

Dheirya Tyagi

Upcoming

  • Testing
  • Python Package on PyPI

License

Copyright © 2022, Dheirya Tyagi. Released under the MIT License.

Package Sidebar

Install

npm i multiply-by-zero

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

4.4 kB

Total Files

4

Last publish

Collaborators

  • dheiryat