DefinitelyTyped/types/fast-isnumeric/index.d.ts
Piotr Błażejewicz (Peter Blazejewicz) 51269623f0
feat(fast-isnumeric): new type definition v1.1 (#43659)
Small helper function From Plotly project:
- definition file
- tests

https://github.com/plotly/fast-isnumeric#api

Thanks!
2020-04-07 08:17:55 -07:00

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;