mattdesl

mattdesl/as-number

return the given number or a default value

JavaScript
0
0
MIT License

As-number is a tiny utility for JavaScript that returns a given value if it's a number, or a specified default (or zero if no default is provided). It's designed for developers who need a simple, reliable way to ensure a numeric value is returned in their code, such as when handling user input or configuration options.

Total donated
Undistributed
Share with your subscribers: