You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
290 B
JavaScript
11 lines
290 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Always returns a numeric value, given a value. Logic from jQuery's `isNumeric`.
|
|
* @param {*} value Possibly numeric value.
|
|
* @return {number} `value` or zero if `value` isn't numeric.
|
|
*/
|
|
export default function getNumber(value) {
|
|
return parseFloat(value) || 0;
|
|
}
|