snakeskin
Advanced tools
Comparing version 4.0.8 to 4.0.9
{ | ||
"name": "Snakeskin", | ||
"main": "build/snakeskin.min.js", | ||
"version": "4.0.8", | ||
"version": "4.0.9", | ||
"homepage": "https://github.com/kobezzza/Snakeskin", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
build\snakeskin.js:816: WARNING - Function print_newline: called with 1 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(i > 0); | ||
^ | ||
build\snakeskin.js:825: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:827: WARNING - Function print_newline: called with 1 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(true); | ||
^ | ||
build\snakeskin.js:861: WARNING - Function trim_output_line: called with 2 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
trim_output_line(output_lines[output_lines.length - 1], eat_newlines); | ||
^ | ||
build\snakeskin.js:866: WARNING - Function trim_output_line: called with 2 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
trim_output_line(output_lines[output_lines.length - 1], eat_newlines); | ||
^ | ||
build\snakeskin.js:1572: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1587: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1603: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1628: WARNING - Function allow_wrap_or_preserved_newline: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
allow_wrap_or_preserved_newline(); | ||
^ | ||
build\snakeskin.js:1634: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1658: WARNING - Function trim_output: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
trim_output(); | ||
^ | ||
build\snakeskin.js:1665: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1669: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1701: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1712: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); // [a, b, c, { | ||
^ | ||
build\snakeskin.js:1717: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1730: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1738: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1742: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1747: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1758: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1765: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1772: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1793: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1799: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1810: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1811: WARNING - Function print_newline: called with 1 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(true); | ||
^ | ||
build\snakeskin.js:1818: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1826: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1832: WARNING - Function allow_wrap_or_preserved_newline: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
allow_wrap_or_preserved_newline(); | ||
^ | ||
build\snakeskin.js:1837: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1882: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1889: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1904: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1908: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1911: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); // }, in lists get a newline treatment | ||
^ | ||
build\snakeskin.js:1915: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1936: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1953: WARNING - Function allow_wrap_or_preserved_newline: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
allow_wrap_or_preserved_newline(); | ||
^ | ||
build\snakeskin.js:1956: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1958: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1967: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1978: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1990: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1992: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:1998: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:1999: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:2002: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2014: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2020: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2027: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2028: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:2035: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2042: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:2047: WARNING - Function allow_wrap_or_preserved_newline: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
allow_wrap_or_preserved_newline(); | ||
^ | ||
build\snakeskin.js:2069: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:2084: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2120: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2132: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2145: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2149: WARNING - Function print_token: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 1 argument(s). | ||
print_token(); | ||
^ | ||
build\snakeskin.js:2152: WARNING - Function print_newline: called with 0 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
print_newline(); | ||
^ | ||
build\snakeskin.js:2614: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:2637: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:2720: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:2725: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:2742: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:2747: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:2959: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:2975: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:2979: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:3002: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:3042: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:3072: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:3077: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:3186: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:3287: WARNING - Function throwErrorTolerant: called with 3 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:3290: WARNING - Function throwErrorTolerant: called with 3 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); | ||
^ | ||
build\snakeskin.js:3564: WARNING - cannot instantiate non-constructor | ||
this.start = new Position(startLine, startColumn); | ||
^ | ||
build\snakeskin.js:3565: WARNING - cannot instantiate non-constructor | ||
this.end = new Position(line, column); | ||
^ | ||
build\snakeskin.js:3625: WARNING - cannot instantiate non-constructor | ||
node.loc = new SourceLocation( | ||
^ | ||
build\snakeskin.js:4059: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant(token, Messages.StrictReservedWord); | ||
^ | ||
build\snakeskin.js:4062: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError(token, Messages.UnexpectedToken, token.value); | ||
^ | ||
build\snakeskin.js:4066: WARNING - Function throwError: called with 3 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
throwError(token, Messages.UnexpectedToken, token.value); | ||
^ | ||
build\snakeskin.js:4185: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant(first, Messages.StrictParamName); | ||
^ | ||
build\snakeskin.js:4202: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant(token, Messages.StrictOctalLiteral); | ||
^ | ||
build\snakeskin.js:4226: WARNING - Function parsePropertyFunction: called with 1 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
value = parsePropertyFunction([]); | ||
^ | ||
build\snakeskin.js:4235: WARNING - Function throwErrorTolerant: called with 3 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant(token, Messages.UnexpectedToken, token.value); | ||
^ | ||
build\snakeskin.js:4236: WARNING - Function parsePropertyFunction: called with 1 argument(s). Function requires at least 2 argument(s) and no more than 2 argument(s). | ||
value = parsePropertyFunction([]); | ||
^ | ||
build\snakeskin.js:4279: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.StrictDuplicateProperty); | ||
^ | ||
build\snakeskin.js:4281: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.AccessorDataProperty); | ||
^ | ||
build\snakeskin.js:4285: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.AccessorDataProperty); | ||
^ | ||
build\snakeskin.js:4287: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.AccessorGetSet); | ||
^ | ||
build\snakeskin.js:4346: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); | ||
^ | ||
build\snakeskin.js:4508: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.StrictLHSPostfix); | ||
^ | ||
build\snakeskin.js:4512: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.InvalidLHSInAssignment); | ||
^ | ||
build\snakeskin.js:4536: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.StrictLHSPrefix); | ||
^ | ||
build\snakeskin.js:4540: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.InvalidLHSInAssignment); | ||
^ | ||
build\snakeskin.js:4558: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.StrictDelete); | ||
^ | ||
build\snakeskin.js:4741: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
throwErrorTolerant({}, Messages.InvalidLHSInAssignment); | ||
^ | ||
build\snakeskin.js:4746: WARNING - Function throwErrorTolerant: called with 2 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s). | ||
@@ -470,2 +70,2 @@ throwErrorTolerant(token, Messages.StrictLHSAssignment); | ||
0 error(s), 118 warning(s), 78,1% typed | ||
0 error(s), 118 warning(s), 78,0% typed |
/*! | ||
* Snakeskin v4.0.8 (live) | ||
* Snakeskin v4.0.9 (live) | ||
* https://github.com/kobezzza/Snakeskin | ||
@@ -8,3 +8,3 @@ * | ||
* | ||
* Date: Thu, 14 Aug 2014 11:26:11 GMT | ||
* Date: Thu, 14 Aug 2014 14:06:46 GMT | ||
*/ | ||
@@ -31,3 +31,3 @@ | ||
*/ | ||
VERSION: [4, 0, 8], | ||
VERSION: [4, 0, 9], | ||
@@ -34,0 +34,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/*! Snakeskin v4.0.8 (live) | https://github.com/kobezzza/Snakeskin/blob/master/LICENSE */Array.isArray=Array.isArray||function(h){return"[object Array]"==={}.toString.call(h)};String.prototype.trim=String.prototype.trim||function(){for(var h=this.replace(/^\s\s*/,""),k=h.length,l=/\s/;l.test(h.charAt(--k)););return h.substring(0,k+1)};var e={VERSION:[4,0,8],a:{},Filters:{},Vars:{},LocalVars:{},cache:{}}; | ||
/*! Snakeskin v4.0.9 (live) | https://github.com/kobezzza/Snakeskin/blob/master/LICENSE */Array.isArray=Array.isArray||function(h){return"[object Array]"==={}.toString.call(h)};String.prototype.trim=String.prototype.trim||function(){for(var h=this.replace(/^\s\s*/,""),k=h.length,l=/\s/;l.test(h.charAt(--k)););return h.substring(0,k+1)};var e={VERSION:[4,0,9],a:{},Filters:{},Vars:{},LocalVars:{},cache:{}}; | ||
(function(){function h(a){return n[a]}function k(a){return p[a]}var l="undefined"===typeof window&&"undefined"!==typeof exports;e.importFilters=function(a,c){var b=e.Filters;if(c)for(var d=c.split("."),f=-1;++f<d.length;)b[d[f]]||(b[d[f]]={}),b=b[d[f]];for(var g in a)a.hasOwnProperty(g)&&(b[g]=a[g])};var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},q=/[&<>"'\/]/g,r=/([$\w]\s*=\s*)([^"'\s>=]+)/g,s=/(javascript)(:|;)/;e.Filters.html=function(a,c){var b=a+"";c&&(b=b.replace(r, | ||
@@ -3,0 +3,0 @@ '$1"$2"'));b=b.replace(q,k);c&&(b=b.replace(s,"$1$2"));return b};e.Filters.undef=function(a){return void 0!==a?a:""};var n={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"},t=/&|<|>|"|'|//g;e.Filters.uhtml=function(a){return(a+"").replace(t,h)};var u=/<\/?[^>]+>/g;e.Filters.stripTags=function(a){return(a+"").replace(u,"")};var v=/%5B/g,w=/%5D/g;e.Filters.uri=function(a){return encodeURI(a+"").replace(v,"[").replace(w,"]")};e.Filters.upper=function(a){return(a+ |
@@ -1,2 +0,2 @@ | ||
/* Snakeskin v4.0.0, label <1407242422187>, generated at <1407242617683> Tue Aug 05 2014 16:43:37 GMT+0400 (Московское время (зима)). This code is generated automatically, don't alter it. */ | ||
/* Snakeskin v4.0.9, label <1407503300938>, generated at <1408025277478> Thu Aug 14 2014 18:07:57 GMT+0400 (Московское время (зима)). This code is generated automatically, don't alter it. */ | ||
(function() { | ||
@@ -22,3 +22,3 @@ var Snakeskin = global.Snakeskin; | ||
__STR__, __TMP__, __J__; | ||
var $_ = __LOCAL__['$_88a1a']; /* Snakeskin template: helloWorld; name */ | ||
var $_ = __LOCAL__['$_a86e7']; /* Snakeskin template: helloWorld; name */ | ||
this.helloWorld = function(name) { | ||
@@ -33,2 +33,6 @@ var __THIS__ = this, | ||
$_; | ||
function getTplResult() { | ||
return __RESULT__; | ||
} | ||
var __RETURN__ = false, | ||
@@ -40,3 +44,3 @@ __RETURN_VAL__; | ||
__RESULT__ += '<h1>Hello '; | ||
__RESULT__ += __FILTERS__.html(__FILTERS__.undef(name)); | ||
__RESULT__ += __FILTERS__.html(__FILTERS__.undef(name), false); | ||
__RESULT__ += '!</h1> '; | ||
@@ -43,0 +47,0 @@ return __RESULT__; |
@@ -1,2 +0,2 @@ | ||
/* Snakeskin v4.0.0, label <1407242422187>, generated at <1407242589069> Tue Aug 05 2014 16:43:09 GMT+0400 (Московское время (зима)). This code is generated automatically, don't alter it. */ | ||
/* Snakeskin v4.0.9, label <1407503300938>, generated at <1408025259045> Thu Aug 14 2014 18:07:39 GMT+0400 (Московское время (зима)). This code is generated automatically, don't alter it. */ | ||
(function() { | ||
@@ -13,3 +13,3 @@ var __ROOT__ = this, | ||
__STR__, __TMP__, __J__; | ||
var $_ = __LOCAL__['$_70743']; /* Snakeskin template: helloWorld; name */ | ||
var $_ = __LOCAL__['$_7abb3']; /* Snakeskin template: helloWorld; name */ | ||
this.helloWorld = function helloWorld(name) { | ||
@@ -24,2 +24,6 @@ var __THIS__ = this, | ||
$_; | ||
function getTplResult() { | ||
return __RESULT__; | ||
} | ||
var __RETURN__ = false, | ||
@@ -31,3 +35,3 @@ __RETURN_VAL__; | ||
__RESULT__ += '<h1>Hello '; | ||
__RESULT__ += __FILTERS__.html(__FILTERS__.undef(name)); | ||
__RESULT__ += __FILTERS__.html(__FILTERS__.undef(name), false); | ||
__RESULT__ += '!</h1> '; | ||
@@ -34,0 +38,0 @@ return __RESULT__; |
12
index.js
@@ -134,5 +134,11 @@ #!/usr/bin/env node | ||
var str = String(data), | ||
res = Snakeskin.compile(str, params, {file: program['file'] || file}); | ||
var res = Snakeskin.compile( | ||
String(data), | ||
params, | ||
{ | ||
file: program['file'] || file | ||
} | ||
); | ||
var toConsole = input && !program['output'] || | ||
@@ -222,3 +228,3 @@ !newFile; | ||
} else { | ||
action(file ? fs.readFileSync(file).toString() : input); | ||
action(file ? fs.readFileSync(file) : input); | ||
} |
@@ -68,3 +68,3 @@ var commandRgxp = /([^\s]+).*/; | ||
var dir = (shortMap[el] || shortMap[next2str]) && nextSpace, | ||
decl = getLineDesc(str, baseShortMap[el] || el === IGNORE_COMMAND ? j + 1 : j); | ||
decl = getLineDesc(str, nextSpace && (baseShortMap[el]) || el === IGNORE_COMMAND ? j + 1 : j); | ||
@@ -71,0 +71,0 @@ if (!decl) { |
@@ -0,0 +0,0 @@ /** |
@@ -103,4 +103,6 @@ var nextLineRgxp = /[\r\n\v]/, | ||
p.throws = s(p.throws, p['throws']) || false; | ||
p.debug = s(p.debug, p['debug']) || null; | ||
var debug = | ||
p.debug = s(p.debug, p['debug']); | ||
var xml = | ||
@@ -120,2 +122,13 @@ p.xml = s(p.xml, p['xml']) !== false; | ||
p.i18nFn = s(p.i18nFn, p['i18nFn']) || 'i18n'; | ||
var i18n = | ||
p.localization = s(p.localization, p['localization']) !== false; | ||
var lang = | ||
p.language = s(p.language, p['language']); | ||
var words = | ||
p.words = s(p.words, p['words']); | ||
var info = opt_info || {}; | ||
@@ -134,4 +147,6 @@ | ||
var text = html || src; | ||
var cacheKey = [ | ||
var cacheKey = lang ? null : [ | ||
cjs, | ||
xml, | ||
p.inlineIterators, | ||
@@ -141,3 +156,6 @@ p.stringBuffer, | ||
p.interface, | ||
p.prettyPrint | ||
p.prettyPrint, | ||
i18n, | ||
p.i18nFn | ||
].join(); | ||
@@ -156,21 +174,47 @@ | ||
} | ||
return globalCache[cacheKey][text]; | ||
} | ||
if (globalCache[cacheKey] && globalCache[cacheKey][text]) { | ||
return globalCache[cacheKey][text]; | ||
} | ||
var res = globalCache[cacheKey][text], | ||
skip = false; | ||
p.i18nFn = s(p.i18nFn, p['i18nFn']) || 'i18n'; | ||
if (words) { | ||
if (!res.words) { | ||
skip = true; | ||
var i18n = | ||
p.localization = s(p.localization, p['localization']) !== false; | ||
} else { | ||
var w = Object(res.words); | ||
var lang = | ||
p.language = s(p.language, p['language']); | ||
for (var key$1 in w) { | ||
if (!w.hasOwnProperty(key$1)) { | ||
continue; | ||
} | ||
var words = | ||
p.words = s(p.words, p['words']); | ||
words[key$1] = w[key$1]; | ||
} | ||
} | ||
} | ||
if (debug) { | ||
if (!res.debug) { | ||
skip = true; | ||
} else { | ||
var d = Object(res.debug); | ||
for (var key$2 in d) { | ||
if (!d.hasOwnProperty(key$2)) { | ||
continue; | ||
} | ||
debug[key$2] = d[key$2]; | ||
} | ||
} | ||
} | ||
if (!skip) { | ||
return res.text; | ||
} | ||
} | ||
var dirname, | ||
@@ -679,3 +723,3 @@ filename; | ||
if (!bOpen) { | ||
var skip = false; | ||
var skip$0 = false; | ||
@@ -685,3 +729,3 @@ if (el === FILTER && filterStartRgxp.test(str.charAt(dir.i + 1))) { | ||
bEnd = false; | ||
skip = true; | ||
skip$0 = true; | ||
@@ -691,6 +735,6 @@ } else if (filterStart && whiteSpaceRgxp.test(el)) { | ||
bEnd = true; | ||
skip = true; | ||
skip$0 = true; | ||
} | ||
if (!skip) { | ||
if (!skip$0) { | ||
if (escapeEndMap[el]) { | ||
@@ -864,8 +908,8 @@ bEnd = true; | ||
for (var key$1 in dir.preProtos) { | ||
if (!dir.preProtos.hasOwnProperty(key$1)) { | ||
for (var key$3 in dir.preProtos) { | ||
if (!dir.preProtos.hasOwnProperty(key$3)) { | ||
continue; | ||
} | ||
dir.error((("template \"" + key$1) + "\" is not defined")); | ||
dir.error((("template \"" + key$3) + "\" is not defined")); | ||
return false; | ||
@@ -878,4 +922,4 @@ } | ||
if (p.debug) { | ||
p.debug['code'] = dir.res; | ||
if (debug) { | ||
debug['code'] = dir.res; | ||
} | ||
@@ -917,10 +961,2 @@ | ||
); | ||
ctx['init'](Snakeskin); | ||
if (!globalFnCache[cacheKey]) { | ||
globalFnCache[cacheKey] = {}; | ||
} | ||
globalFnCache[cacheKey][text] = ctx; | ||
} | ||
@@ -945,10 +981,2 @@ | ||
ctx['init'](Snakeskin); | ||
if (!globalFnCache[cacheKey]) { | ||
globalFnCache[cacheKey] = {}; | ||
} | ||
globalFnCache[cacheKey][text] = ctx; | ||
// Живая компиляция в браузере | ||
@@ -959,2 +987,14 @@ } else if (!cjs) { | ||
if (ctx !== NULL) { | ||
ctx['init'](Snakeskin); | ||
if (cacheKey) { | ||
if (!globalFnCache[cacheKey]) { | ||
globalFnCache[cacheKey] = {}; | ||
} | ||
globalFnCache[cacheKey][text] = ctx; | ||
} | ||
} | ||
} catch (err) { | ||
@@ -968,8 +1008,14 @@ delete info['line']; | ||
if (!globalCache[cacheKey]) { | ||
globalCache[cacheKey] = {}; | ||
if (cacheKey) { | ||
if (!globalCache[cacheKey]) { | ||
globalCache[cacheKey] = {}; | ||
} | ||
globalCache[cacheKey][text] = { | ||
text: dir.res, | ||
words: words, | ||
debug: debug | ||
}; | ||
} | ||
globalCache[cacheKey][text] = dir.res; | ||
if (!IS_NODE && !cjs) { | ||
@@ -976,0 +1022,0 @@ setTimeout(function() { |
@@ -11,3 +11,3 @@ //#include ./es5shim.live.js | ||
*/ | ||
VERSION: [4, 0, 8], | ||
VERSION: [4, 0, 9], | ||
@@ -14,0 +14,0 @@ /** |
@@ -108,3 +108,6 @@ Snakeskin.addDirective( | ||
arg[0] = (("'" + (this.pasteTplVarBlocks(arg[0]))) + "'"); | ||
arg[0] = this.replaceDangerBlocks( | ||
(("'" + (this.pasteTplVarBlocks(arg[0]))) + "'") | ||
); | ||
var vals = arg[1].split(' '); | ||
@@ -120,3 +123,5 @@ | ||
val = this.prepareOutput((("'" + (this.pasteTplVarBlocks(val))) + "'"), true) || ''; | ||
val = this.prepareOutput( | ||
this.replaceDangerBlocks((("'" + (this.pasteTplVarBlocks(val))) + "'")), true | ||
) || ''; | ||
@@ -123,0 +128,0 @@ res += (("\ |
@@ -0,0 +0,0 @@ var blockNameRgxp = /^[^a-z_$][^\w$]*|[^\w$]+/i; |
@@ -349,2 +349,6 @@ /** | ||
\n\ | ||
\n function getTplResult() {\ | ||
\n return " + (this.returnResult())) + (";\ | ||
\n }\ | ||
\n\ | ||
\n var __RETURN__ = false,\ | ||
@@ -351,0 +355,0 @@ \n __RETURN_VAL__;\ |
{ | ||
"name": "snakeskin", | ||
"version": "4.0.8", | ||
"version": "4.0.9", | ||
"main": "snakeskin.js", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -7,4 +7,2 @@ module.exports = exports = require('./build/snakeskin.min'); | ||
var cache = {}; | ||
/** | ||
@@ -44,6 +42,2 @@ * Вернуть true, если заданный файл шаблонов соответствует скомпилированному | ||
exports.compileFile = function (src, opt_params) { | ||
if (cache[src]) { | ||
return cache[src]; | ||
} | ||
opt_params = opt_params || {}; | ||
@@ -67,4 +61,3 @@ opt_params.commonJS = true; | ||
if (res !== false) { | ||
cache[src] = | ||
tpls = require(resSrc); | ||
tpls = require(resSrc); | ||
@@ -71,0 +64,0 @@ if (tpls.init) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
36840
1800802