Newer
Older
2022-autumn-study / node_modules / es5-ext / number / is-number.js
@ItoRino ItoRino on 4 Oct 2022 264 bytes first commit
"use strict";

var objToString = Object.prototype.toString, id = objToString.call(1);

module.exports = function (value) {
	return (
		typeof value === "number" ||
		value instanceof Number ||
		(typeof value === "object" && objToString.call(value) === id)
	);
};