Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Dheirya/multiply-by-zero

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.