From 932eacfba30061f3abc31bc4d328d27dcad7efca Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 9 Nov 2010 00:44:35 +0000 Subject: Added elgg.isNumber type-checking function git-svn-id: http://code.elgg.org/elgg/trunk@7260 36083f99-b078-4883-b0ff-0f9b5a30f544 --- js/lib/elgglib.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/lib/elgglib.js b/js/lib/elgglib.js index dc1f8f60c..a8ab2020c 100644 --- a/js/lib/elgglib.js +++ b/js/lib/elgglib.js @@ -68,6 +68,17 @@ elgg.isString = function(val) { return typeof val === 'string'; }; +/** + * Check if the value is a number + * + * @param {*} val + * + * @return boolean + */ +elgg.isNumber = function(val) { + return typeof val === 'number'; +}; + /** * Check if the value is an object * -- cgit v1.2.3