~launchpad-pqm/lazr-js/toolchain

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/substitute/substitute-min.js

  • Committer: Sidnei da Silva
  • Date: 2009-11-16 00:51:29 UTC
  • mto: This revision was merged to the branch mainline in revision 154.
  • Revision ID: sidnei.da.silva@canonical.com-20091116005129-8ibwjlboa38glaw5
- Improved generation of skin modules and revamped combo service to make it more twisty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
 
Code licensed under the BSD License:
4
 
http://developer.yahoo.com/yui/license.html
5
 
version: 3.2.0
6
 
build: 2676
7
 
*/
8
 
YUI.add("substitute",function(G){var B=G.Lang,D="dump",F=" ",C="{",E="}",A=function(U,I,O,H){var M,L,K,S,R,T,Q=[],J,N,P=U.length;for(;;){M=U.lastIndexOf(C,P);if(M<0){break;}L=U.indexOf(E,M);if(M+1>=L){break;}J=U.substring(M+1,L);S=J;T=null;K=S.indexOf(F);if(K>-1){T=S.substring(K+1);S=S.substring(0,K);}R=I[S];if(O){R=O(S,R,T);}if(B.isObject(R)){if(!G.dump){R=R.toString();}else{if(B.isArray(R)){R=G.dump(R,parseInt(T,10));}else{T=T||"";N=T.indexOf(D);if(N>-1){T=T.substring(4);}if(R.toString===Object.prototype.toString||N>-1){R=G.dump(R,parseInt(T,10));}else{R=R.toString();}}}}else{if(!B.isString(R)&&!B.isNumber(R)){R="~-"+Q.length+"-~";Q[Q.length]=J;}}U=U.substring(0,M)+R+U.substring(L+1);if(!H){P=M-1;}}for(M=Q.length-1;M>=0;M=M-1){U=U.replace(new RegExp("~-"+M+"-~"),C+Q[M]+E,"g");}return U;};G.substitute=A;B.substitute=A;},"3.2.0",{optional:["dump"]});
 
 
b'\\ No newline at end of file'