convert metricFunctions to TS

This commit is contained in:
Alexander Zobnin
2020-05-07 11:49:51 +03:00
parent 44660476ca
commit e7cd31c75c
2 changed files with 28 additions and 20 deletions

View File

@@ -345,6 +345,13 @@ export function getArrayDepth(a, level = 0) {
return level + 1;
}
/**
* Checks whether its argument represents a numeric value.
*/
export function isNumeric(n: any): boolean {
return !isNaN(parseFloat(n)) && isFinite(n);
}
// Fix for backward compatibility with lodash 2.4
if (!_.includes) {
_.includes = (_ as any).contains;