Browse Source

Added Utils.isInt() function.

dev-tmpl
Bryan Miller 5 years ago
parent
commit
3cd7c1984b
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      app/js/common/Utils.js

+ 8
- 0
app/js/common/Utils.js View File

const utils = { const utils = {
isInt:function(v){
if (isNaN(v)){
return false;
}
var x = parseFloat(v);
return (x | 0) === x;
},

isElement:function(el){ isElement:function(el){
// Code based on... // Code based on...
// https://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object // https://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object

Loading…
Cancel
Save