Update live editor to 0.0.6
This commit is contained in:
1 parent
4ffdb0c43f
commit
3713408871
4 files changed
+29
-29
No files matched your search
+1
-1
@@ -71,7 +71,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="options">
|
||||
<label class="title">prettier v0.0.5</label>
|
||||
<label class="title">prettier v0.0.6</label>
|
||||
<label><input type="number" value="80" id="printWidth"></input> printWidth</label>
|
||||
<label><input type="number" value="2" id="tabWidth"></input> tabWidth</label>
|
||||
<label><input type="checkbox" id="singleQuote"></input> singleQuote</label>
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
var prettier=function(){function Se(Qh,$h){return $h={exports:{}},Qh($h,$h.exports),$h.exports}function Te(){$l=!0;var Qh='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var $h=0,Sg=Qh.length;$h<Sg;++$h)Zl[$h]=Qh[$h],Kl[Qh.charCodeAt($h)]=$h;Kl['-'.charCodeAt(0)]=62,Kl['_'.charCodeAt(0)]=63}function _e(Qh){$l||Te();var Lg=Qh.length,$h,Sg,Tg,_g,Pg,Ng;if(0<Lg%4)throw new Error('Invalid string. Length must be a multiple of 4');Pg='='===Qh[Lg-2]?2:'='===Qh[Lg-1]?1:0,Ng=new Ql(3*Lg/4-Pg),Tg=0<Pg?Lg-4:Lg;var Ig=0;for($h=0,Sg=0;$h<Tg;$h+=4,Sg+=3)_g=Kl[Qh.charCodeAt($h)]<<18|Kl[Qh.charCodeAt($h+1)]<<12|Kl[Qh.charCodeAt($h+2)]<<6|Kl[Qh.charCodeAt($h+3)],Ng[Ig++]=255&_g>>16,Ng[Ig++]=255&_g>>8,Ng[Ig++]=255&_g;return 2===Pg?(_g=Kl[Qh.charCodeAt($h)]<<2|Kl[Qh.charCodeAt($h+1)]>>4,Ng[Ig++]=255&_g):1==Pg&&(_g=Kl[Qh.charCodeAt($h)]<<10|Kl[Qh.charCodeAt($h+1)]<<4|Kl[Qh.charCodeAt($h+2)]>>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Math.pow(2,-77):0,Vg=Tg?0:Pg-1,Ug=Tg?1:-1,Xg=0>$h||0===$h&&0>1/$h?1:0;for($h=Math.abs($h),isNaN($h)||$h===Infinity?(Lg=isNaN($h)?1:0,Ng=Mg):(Ng=Math.floor(Math.log($h)/Math.LN2),1>$h*(Ig=Math.pow(2,-Ng))&&(Ng--,Ig*=2),$h+=1<=Ng+Og?Yg/Ig:Yg*Math.pow(2,1-Og),2<=$h*Ig&&(Ng++,Ig/=2),Ng+Og>=Mg?(Lg=0,Ng=Mg):1<=Ng+Og?(Lg=($h*Ig-1)*Math.pow(2,_g),Ng+=Og):(Lg=$h*Math.pow(2,Og-1)*Math.pow(2,_g),Ng=0));8<=_g;Qh[Sg+Vg]=255&Lg,Vg+=Ug,Lg/=256,_g-=8);for(Ng=Ng<<_g|Lg,Rg+=_g;0<Rg;Qh[Sg+Vg]=255&Ng,Vg+=Ug,Ng/=256,Rg-=8);Qh[Sg+Vg-Ug]|=128*Xg}function Oe(){return Ve.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ye(Qh,$h){if(Oe()<$h)throw new RangeError('Invalid typed array length');return Ve.TYPED_ARRAY_SUPPORT?(Qh=new Uint8Array($h),Qh.__proto__=Ve.prototype):(null===Qh&&(Qh=new Ve($h)),Qh.length=$h),Qh}function Ve(Qh,$h,Sg){if(!Ve.TYPED_ARRAY_SUPPORT&&!(this instanceof Ve))return new Ve(Qh,$h,Sg);if('number'==typeof Qh){if('string'==typeof $h)throw new Error('If encoding is specified then the first argument must be a string');return Je(this,Qh)}return Ue(this,Qh,$h,Sg)}function Ue(Qh,$h,Sg,Tg){if('number'==typeof $h)throw new TypeError('"value" argument must not be a number');return'undefined'!=typeof ArrayBuffer&&$h instanceof ArrayBuffer?Qe(Qh,$h,Sg,Tg):'string'==typeof $h?Ze(Qh,$h,Sg):$e(Qh,$h)}function Xe(Qh){if('number'!=typeof Qh)throw new TypeError('"size" argument must be a number');else if(0>Qh)throw new RangeError('"size" argument must not be negative')}function We(Qh,$h,Sg,Tg){return Xe($h),0>=$h?Ye(Qh,$h):void 0===Sg?Ye(Qh,$h):'string'==typeof Tg?Ye(Qh,$h).fill(Sg,Tg):Ye(Qh,$h).fill(Sg)}function Je(Qh,$h){if(Xe($h),Qh=Ye(Qh,0>$h?0:0|St($h)),!Ve.TYPED_ARRAY_SUPPORT)for(var Sg=0;Sg<$h;++Sg)Qh[Sg]=0;return Qh}function Ze(Qh,$h,Sg){if(('string'!=typeof Sg||''===Sg)&&(Sg='utf8'),!Ve.isEncoding(Sg))throw new TypeError('"encoding" must be a valid string encoding');var Tg=0|_t($h,Sg);Qh=Ye(Qh,Tg);var _g=Qh.write($h,Sg);return _g!==Tg&&(Qh=Qh.slice(0,_g)),Qh}function Ke(Qh,$h){var Sg=0>$h.length?0:0|St($h.length);Qh=Ye(Qh,Sg);for(var Tg=0;Tg<Sg;Tg+=1)Qh[Tg]=255&$h[Tg];return Qh}function Qe(Qh,$h,Sg,Tg){if($h.byteLength,0>Sg||$h.byteLength<Sg)throw new RangeError('\'offset\' is out of bounds');if($h.byteLength<Sg+(Tg||0))throw new RangeError('\'length\' is out of bounds');return $h=void 0===Sg&&void 0===Tg?new Uint8Array($h):void 0===Tg?new Uint8Array($h,Sg):new Uint8Array($h,Sg,Tg),Ve.TYPED_ARRAY_SUPPORT?(Qh=$h,Qh.__proto__=Ve.prototype):Qh=Ke(Qh,$h),Qh}function $e(Qh,$h){if(Tt($h)){var Sg=0|St($h.length);return(Qh=Ye(Qh,Sg),0===Qh.length)?Qh:($h.copy(Qh,0,0,Sg),Qh)}if($h){if('undefined'!=typeof ArrayBuffer&&$h.buffer instanceof ArrayBuffer||'length'in $h)return'number'!=typeof $h.length||Za($h.length)?Ye(Qh,0):Ke(Qh,$h);if('Buffer'===$h.type&&_p($h.data))return Ke(Qh,$h.data)}throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')}function St(Qh){if(Qh>=Oe())throw new RangeError('Attempt to allocate Buffer lLine truncated
|
||||
var prettier=function(){function Se(Rg,Mg){return Mg={exports:{}},Rg(Mg,Mg.exports),Mg.exports}function Te(){Lp=!0;var Rg='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var Mg=0,Og=Rg.length;Mg<Og;++Mg)hp[Mg]=Rg[Mg],_p[Rg.charCodeAt(Mg)]=Mg;_p['-'.charCodeAt(0)]=62,_p['_'.charCodeAt(0)]=63}function _e(Rg){Lp||Te();var Wg=Rg.length,Mg,Og,Yg,Vg,Ug,Xg;if(0<Wg%4)throw new Error('Invalid string. Length must be a multiple of 4');Ug='='===Rg[Wg-2]?2:'='===Rg[Wg-1]?1:0,Xg=new Np(3*Wg/4-Ug),Yg=0<Ug?Wg-4:Wg;var Jg=0;for(Mg=0,Og=0;Mg<Yg;Mg+=4,Og+=3)Vg=_p[Rg.charCodeAt(Mg)]<<18|_p[Rg.charCodeAt(Mg+1)]<<12|_p[Rg.charCodeAt(Mg+2)]<<6|_p[Rg.charCodeAt(Mg+3)],Xg[Jg++]=255&Vg>>16,Xg[Jg++]=255&Vg>>8,Xg[Jg++]=255&Vg;return 2===Ug?(Vg=_p[Rg.charCodeAt(Mg)]<<2|_p[Rg.charCodeAt(Mg+1)]>>4,Xg[Jg++]=255&Vg):1==Ug&&(Vg=_p[Rg.charCodeAt(Mg)]<<10|_p[Rg.charCodeAt(Mg+1)]<<4|_p[Rg.charCodeAt(Mg+2)]>>2,Xg[Jg++]=255&Vg>>8,Xg[Jg++]=255&Vg),Xg}function Pe(Rg){return hp[63&Rg>>18]+hp[63&Rg>>12]+hp[63&Rg>>6]+hp[63&Rg]}function Ne(Rg,Mg,Og){var Yg,Vg=[];for(var Ug=Mg;Ug<Og;Ug+=3)Yg=(Rg[Ug]<<16)+(Rg[Ug+1]<<8)+Rg[Ug+2],Vg.push(Pe(Yg));return Vg.join('')}function Le(Rg){Lp||Te();var Og=Rg.length,Yg=Og%3,Vg='',Ug=[],Xg=16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&&(Xg++,Jg/=2),Xg+Qg>=Kg?(Wg=0,Xg=Kg):1<=Xg+Qg?(Wg=(Mg*Jg-1)*Math.pow(2,Vg),Xg+=Qg):(Wg=Mg*Math.pow(2,Qg-1)*Math.pow(2,Vg),Xg=0));8<=Vg;Rg[Og+Sy]=255&Wg,Sy+=Ty,Wg/=256,Vg-=8);for(Xg=Xg<<Vg|Wg,Zg+=Vg;0<Zg;Rg[Og+Sy]=255&Xg,Sy+=Ty,Xg/=256,Zg-=8);Rg[Og+Sy-Ty]|=128*_y}function Oe(){return Ve.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ye(Rg,Mg){if(Oe()<Mg)throw new RangeError('Invalid typed array length');return Ve.TYPED_ARRAY_SUPPORT?(Rg=new Uint8Array(Mg),Rg.__proto__=Ve.prototype):(null===Rg&&(Rg=new Ve(Mg)),Rg.length=Mg),Rg}function Ve(Rg,Mg,Og){if(!Ve.TYPED_ARRAY_SUPPORT&&!(this instanceof Ve))return new Ve(Rg,Mg,Og);if('number'==typeof Rg){if('string'==typeof Mg)throw new Error('If encoding is specified then the first argument must be a string');return Je(this,Rg)}return Ue(this,Rg,Mg,Og)}function Ue(Rg,Mg,Og,Yg){if('number'==typeof Mg)throw new TypeError('"value" argument must not be a number');return'undefined'!=typeof ArrayBuffer&&Mg instanceof ArrayBuffer?Qe(Rg,Mg,Og,Yg):'string'==typeof Mg?Ze(Rg,Mg,Og):$e(Rg,Mg)}function Xe(Rg){if('number'!=typeof Rg)throw new TypeError('"size" argument must be a number');else if(0>Rg)throw new RangeError('"size" argument must not be negative')}function We(Rg,Mg,Og,Yg){return Xe(Mg),0>=Mg?Ye(Rg,Mg):void 0===Og?Ye(Rg,Mg):'string'==typeof Yg?Ye(Rg,Mg).fill(Og,Yg):Ye(Rg,Mg).fill(Og)}function Je(Rg,Mg){if(Xe(Mg),Rg=Ye(Rg,0>Mg?0:0|St(Mg)),!Ve.TYPED_ARRAY_SUPPORT)for(var Og=0;Og<Mg;++Og)Rg[Og]=0;return Rg}function Ze(Rg,Mg,Og){if(('string'!=typeof Og||''===Og)&&(Og='utf8'),!Ve.isEncoding(Og))throw new TypeError('"encoding" must be a valid string encoding');var Yg=0|_t(Mg,Og);Rg=Ye(Rg,Yg);var Vg=Rg.write(Mg,Og);return Vg!==Yg&&(Rg=Rg.slice(0,Vg)),Rg}function Ke(Rg,Mg){var Og=0>Mg.length?0:0|St(Mg.length);Rg=Ye(Rg,Og);for(var Yg=0;Yg<Og;Yg+=1)Rg[Yg]=255&Mg[Yg];return Rg}function Qe(Rg,Mg,Og,Yg){if(Mg.byteLength,0>Og||Mg.byteLength<Og)throw new RangeError('\'offset\' is out of bounds');if(Mg.byteLength<Og+(Yg||0))throw new RangeError('\'length\' is out of bounds');return Mg=void 0===Og&&void 0===Yg?new Uint8Array(Mg):void 0===Yg?new Uint8Array(Mg,Og):new Uint8Array(Mg,Og,Yg),Ve.TYPED_ARRAY_SUPPORT?(Rg=Mg,Rg.__proto__=Ve.prototype):Rg=Ke(Rg,Mg),Rg}function $e(Rg,Mg){if(Tt(Mg)){var Og=0|St(Mg.length);return(Rg=Ye(Rg,Og),0===Rg.length)?Rg:(Mg.copy(Rg,0,0,Og),Rg)}if(Mg){if('undefined'!=typeof ArrayBuffer&&Mg.buffer instanceof ArrayBuffer||'length'in Mg)return'number'!=typeof Mg.length||Za(Mg.length)?Ye(Rg,0):Ke(Rg,Mg);if('Buffer'===Mg.type&&Rp(Mg.data))return Ke(Rg,Mg.data)}throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')}function St(Rg){if(Rg>=Oe())throw new RangeError('Attempt to allocate Buffer lLine truncated
|
||||
Reference in new issue
Block a user