mirror of
https://github.com/wahyd4/cdnjs.git
synced 2026-08-20 02:06:06 +10:00
2 lines
5.2 KiB
JavaScript
2 lines
5.2 KiB
JavaScript
// Generated by CoffeeScript 1.3.3
|
|
(function(){function s(e,t){var n={},r={},i,s={},o={},u={},a={};s[0]="HTML_SPECIALCHARS",s[1]="HTML_ENTITIES",o[0]="ENT_NOQUOTES",o[2]="ENT_COMPAT",o[3]="ENT_QUOTES",u=isNaN(e)?e?e.toUpperCase():"HTML_SPECIALCHARS":s[e],a=isNaN(t)?t?t.toUpperCase():"ENT_COMPAT":o[t];if(u!=="HTML_SPECIALCHARS"&&u!=="HTML_ENTITIES")throw new Error("Table: "+u+" not supported");n[38]="&",u==="HTML_ENTITIES"&&(n[160]=" ",n[161]="¡",n[162]="¢",n[163]="£",n[164]="¤",n[165]="¥",n[166]="¦",n[167]="§",n[168]="¨",n[169]="©",n[170]="ª",n[171]="«",n[172]="¬",n[173]="­",n[174]="®",n[175]="¯",n[176]="°",n[177]="±",n[178]="²",n[179]="³",n[180]="´",n[181]="µ",n[182]="¶",n[183]="·",n[184]="¸",n[185]="¹",n[186]="º",n[187]="»",n[188]="¼",n[189]="½",n[190]="¾",n[191]="¿",n[192]="À",n[193]="Á",n[194]="Â",n[195]="Ã",n[196]="Ä",n[197]="Å",n[198]="Æ",n[199]="Ç",n[200]="È",n[201]="É",n[202]="Ê",n[203]="Ë",n[204]="Ì",n[205]="Í",n[206]="Î",n[207]="Ï",n[208]="Ð",n[209]="Ñ",n[210]="Ò",n[211]="Ó",n[212]="Ô",n[213]="Õ",n[214]="Ö",n[215]="×",n[216]="Ø",n[217]="Ù",n[218]="Ú",n[219]="Û",n[220]="Ü",n[221]="Ý",n[222]="Þ",n[223]="ß",n[224]="à",n[225]="á",n[226]="â",n[227]="ã",n[228]="ä",n[229]="å",n[230]="æ",n[231]="ç",n[232]="è",n[233]="é",n[234]="ê",n[235]="ë",n[236]="ì",n[237]="í",n[238]="î",n[239]="ï",n[240]="ð",n[241]="ñ",n[242]="ò",n[243]="ó",n[244]="ô",n[245]="õ",n[246]="ö",n[247]="÷",n[248]="ø",n[249]="ù",n[250]="ú",n[251]="û",n[252]="ü",n[253]="ý",n[254]="þ",n[255]="ÿ"),a!=="ENT_NOQUOTES"&&(n[34]="""),a==="ENT_QUOTES"&&(n[39]="'"),n[60]="<",n[62]=">";for(i in n)n.hasOwnProperty(i)&&(r[String.fromCharCode(i)]=n[i]);return r}var e,t,n,r,i;e=function(){function e(e){this.s=e,this.s==null&&(this.s=this)}return e.prototype.camelize=function(){var t;return t=this.trim().s.replace(/(\-|_|\s)+(.)?/g,function(e,t,n){return n?n.toUpperCase():""}),new e(t)},e.prototype.capitalize=function(){return new e(this.s.substr(0,1).toUpperCase()+this.s.substring(1).toLowerCase())},e.prototype.collapseWhitespace=function(){var t;return t=this.s.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,""),new e(t)},e.prototype.contains=function(e){return this.s.indexOf(e)>=0},e.prototype.dasherize=function(){var t;return t=this.trim().s.replace(/[_\s]+/g,"-").replace(/([A-Z])/g,"-$1").replace(/-+/g,"-").toLowerCase(),new e(t)},e.prototype.decodeHtmlEntities=function(t){var n,r,i,o;r={},i=n="",o=this.s;if(!1===(r=s("HTML_ENTITIES",t)))return!1;delete r["&"],r["&"]="&";for(i in r)n=r[i],o=o.split(n).join(i);return o=o.split("'").join("'"),new e(o)},e.prototype.endsWith=function(e){var t;return t=this.s.length-e.length,t>=0&&this.s.indexOf(e,t)===t},e.prototype.isAlpha=function(){return!/[^a-zA-Z]/.test(this.s)},e.prototype.isAlphaNumeric=function(){return!/[^a-zA-Z0-9]/.test(this.s)},e.prototype.isEmpty=function(){return/^[\s\xa0]*$/.test(this.s)},e.prototype.isLower=function(){return!/[^a-z]/.test(this.s)},e.prototype.isNumeric=function(){return!/[^0-9]/.test(this.s)},e.prototype.isUpper=function(){return!/[^A-Z]/.test(this.s)},e.prototype.left=function(t){var n;return t>=0?(n=this.s.substr(0,t),new e(n)):this.right(-t)},e.prototype.ltrim=function(){var t;return t=this.s.replace(/(^\s*)/g,""),new e(t)},e.prototype.replaceAll=function(t,n){var r;return r=this.s.replace(new RegExp(t,"g"),n),new e(r)},e.prototype.right=function(t){var n;return t>=0?(n=this.s.substr(this.s.length-t,t),new e(n)):this.left(-t)},e.prototype.rtrim=function(){var t;return t=this.s.replace(/\s+$/,""),new e(t)},e.prototype.startsWith=function(e){return this.s.lastIndexOf(e,0)===0},e.prototype.times=function(t){return new e((new Array(t+1)).join(this.s))},e.prototype.trim=function(){var t;return typeof String.prototype.trim=="undefined"?t=this.s.replace(/(^\s*|\s*$)/g,""):t=this.s.trim(),new e(t)},e.prototype.toString=function(){return this.s},e.prototype.underscore=function(){var t;return t=this.trim().s.replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase(),(new e(this.s.charAt(0))).isUpper()&&(t="_"+t),new e(t)},e.prototype.repeat=e.prototype.times,e.prototype.include=e.prototype.contains,e}(),i=function(t){return new e(t)},n=[],t=function(){var t,r,i,s;i=new e,s=[];for(r in i)t=i[r],String.prototype.hasOwnProperty(r)?s.push(void 0):(n.push(r),s.push(String.prototype[r]=function(){return String.prototype.s=this,t.apply(this,arguments)}));return s},r=function(){var e,t,r;for(t=0,r=n.length;t<r;t++)e=n[t],delete String.prototype[e];return n.length=0},typeof window!="undefined"&&window!==null?(window.S=i,window.S.clobberPrototype=t,window.S.restorePrototype=r):(module.exports=i,module.exports.clobberPrototype=t,module.exports.restorePrototype=r)}).call(this); |