1(function ($) { 2 if (!$) { 3 return; 4 } 5 6 if (typeof $.camelCase !== 'function') { 7 $.camelCase = function (string) { 8 return string.replace(/-([a-z])/g, function (_, letter) { 9 return letter.toUpperCase(); 10 }); 11 }; 12 } 13 14 if (typeof $.isNumeric !== 'function') { 15 $.isNumeric = function (obj) { 16 var type = typeof obj; 17 return (type === 'number' || type === 'string') && 18 !isNaN(obj - parseFloat(obj)); 19 }; 20 } 21 22 if (typeof $.isArray !== 'function') { 23 $.isArray = Array.isArray; 24 } 25 26 if (typeof $.isFunction !== 'function') { 27 $.isFunction = function (obj) { 28 return typeof obj === 'function'; 29 }; 30 } 31 32 if (typeof $.isWindow !== 'function') { 33 $.isWindow = function (obj) { 34 return obj != null && obj === obj.window; 35 }; 36 } 37 38 if (typeof $.trim !== 'function') { 39 $.trim = function (str) { 40 return str == null ? '' : (str + '').trim(); 41 }; 42 } 43 44 if (typeof $.type !== 'function') { 45 $.type = function (obj) { 46 if (obj == null) { 47 return obj + ''; 48 } 49 return typeof obj === 'object' || typeof obj === 'function' 50 ? Object.prototype.toString.call(obj).slice(8, -1).toLowerCase() 51 : typeof obj; 52 }; 53 } 54})(window.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.