|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
411 bytes
|
| Line | |
|---|
| 1 | /*!
|
|---|
| 2 | * is-number <https://github.com/jonschlinkert/is-number>
|
|---|
| 3 | *
|
|---|
| 4 | * Copyright (c) 2014-present, Jon Schlinkert.
|
|---|
| 5 | * Released under the MIT License.
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | 'use strict';
|
|---|
| 9 |
|
|---|
| 10 | module.exports = function(num) {
|
|---|
| 11 | if (typeof num === 'number') {
|
|---|
| 12 | return num - num === 0;
|
|---|
| 13 | }
|
|---|
| 14 | if (typeof num === 'string' && num.trim() !== '') {
|
|---|
| 15 | return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
|
|---|
| 16 | }
|
|---|
| 17 | return false;
|
|---|
| 18 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.