Design & Download
Your JS Library
in Seconds!!!

Snippet: isFinite() ES6 Style

Written by Christopher West (cwest) on November 29, 2015.
Tests a value to see if it is a number that is also finite.
function isFinite(value) {
  return typeOf(value, 'Number') && __global.isFinite(value);
}

isFinite() API Documentation

Description

Tests a value to see if it is a number that is also finite.

Parameters

  1. value {*}:
    The value to be tested to see if it is a number and is finite.

Returns

Returns true if value is a number and is finite, otherwise false is returned.