UNPKG

falcor-router

Version:

A router DataSource constructor for falcor that allows you to model all your cloud data sources as a single JSON resource.

13 lines (12 loc) 258 B
/** * Will determine of the argument is a number. * * '1' returns true * 1 returns true * [1] returns false * null returns false * @param {*} x */ module.exports = function(x) { return String(Number(x)) === String(x) && typeof x !== 'object'; };