mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Small helper function From Plotly project: - definition file - tests https://github.com/plotly/fast-isnumeric#api Thanks!
17 lines
596 B
TypeScript
17 lines
596 B
TypeScript
// Type definitions for fast-isnumeric 1.1
|
|
// Project: https://github.com/plotly/fast-isnumeric#readme
|
|
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/**
|
|
* The fast way to check if a JS object is numeric
|
|
* Inspired by is-number <https://github.com/jonschlinkert/is-number>
|
|
* but significantly simplified and sped up by ignoring number and string constructors
|
|
* ie these return false:
|
|
* new Number(1)
|
|
* new String('1')
|
|
*/
|
|
declare function isNumeric(n: any): boolean;
|
|
|
|
export = isNumeric;
|