X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=3389e83f79c5979dd48122cb16b6e328476893ff;hb=0be7f4eb4f027dce00f11d7816290022d447d336;hp=cc921385d939141b02320050851ea0cf4b78dfa5;hpb=e0a9615f82fcdad73de6db42a995eb2a5550e361;p=jquery.git diff --git a/src/core.js b/src/core.js index cc92138..3389e83 100644 --- a/src/core.js +++ b/src/core.js @@ -33,6 +33,9 @@ var jQuery = function( selector, context ) { // Check for non-word characters rnonword = /\W/, + // Check for digits + rdigit = /\d/, + // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, @@ -488,6 +491,10 @@ jQuery.extend({ return obj && typeof obj === "object" && "setInterval" in obj; }, + isNaN: function( obj ) { + return obj == null || !rdigit.test( obj ) || isNaN( obj ); + }, + type: function( obj ) { return obj == null ? String( obj ) :