{"size": 1346, "ext": "js", "max_stars_repo_path": "src/chronos/testing/moment/is_number.spec.js", "max_stars_repo_name": "SvetlanaMuravlova/try-schematics", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/chronos/testing/moment/is_number.spec.js", "max_issues_repo_name": "SvetlanaMuravlova/try-schematics", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/chronos/testing/moment/is_number.spec.js", "max_forks_repo_name": "SvetlanaMuravlova/try-schematics", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 48.0714285714, "max_line_length": 105, "alphanum_fraction": 0.618127786}
import { assertOk } from '../test-helpers';
import { isNumber } from '../../utils/type-checks';
describe('is number', () => {
    it('isNumber recognizes numbers', function () {
        assertOk(isNumber(1), 'simple integer');
        assertOk(isNumber(0), 'simple number');
        assertOk(isNumber(-0), 'silly number');
        assertOk(isNumber(1010010293029), 'large number');
        assertOk(isNumber(Infinity), 'largest number');
        assertOk(isNumber(-Infinity), 'smallest number');
        assertOk(isNumber(NaN), 'not number');
        assertOk(isNumber(1.100393830000), 'decimal numbers');
        assertOk(isNumber(Math.LN2), 'natural log of two');
        assertOk(isNumber(Math.PI), 'delicious number');
        assertOk(isNumber(5e10), 'scientifically notated number');
        assertOk(isNumber(new Number(1)), 'number primitive wrapped in an object'); // jshint ignore:line
    });
    it('isNumber rejects non-numbers', function () {
        assertOk(!isNumber(), 'nothing');
        assertOk(!isNumber(undefined), 'undefined');
        assertOk(!isNumber(null), 'null');
        assertOk(!isNumber([1]), 'array');
        assertOk(!isNumber('[1,2,3]'), 'string');
        assertOk(!isNumber(new Date()), 'date');
        assertOk(!isNumber({ a: 1, b: 2 }), 'object');
    });
});
//# sourceMappingURL=is_number.spec.js.map