UNPKG

locutus

Version:

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

14 lines (13 loc) 600 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.is_real = is_real; const is_float_ts_1 = require("../var/is_float.js"); function is_real(mixedVar) { // discuss at: https://locutus.io/php/is_real/ // original by: Brett Zamir (https://brett-zamir.me) // note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes // note 1: it different from the PHP implementation. We can't fix this unfortunately. // example 1: is_real(186.31) // returns 1: true return (0, is_float_ts_1.is_float)(mixedVar); }