holmes 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +10 -0
- data/Rakefile +1 -0
- data/holmes.gemspec +24 -0
- data/lib/holmes.rb +38 -0
- data/lib/holmes/node_modules/detective/README.markdown +64 -0
- data/lib/holmes/node_modules/detective/example/strings.js +6 -0
- data/lib/holmes/node_modules/detective/example/strings_src.js +3 -0
- data/lib/holmes/node_modules/detective/index.js +65 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/.npmignore +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/README.markdown +185 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/browserify.js +4296 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/example/microwave.js +7 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/example/web/bs.js +4832 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/example/web/index.html +14 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/example/web/main.js +17 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/example/web/server.js +12 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/example/wrap.js +7 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/index.html +8 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/index.js +208 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/main.js +11 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/.bin/uglifyjs +317 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/.npmignore +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/LICENSE +24 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/README.markdown +237 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/examples/json.js +16 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/examples/leaves.js +15 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/examples/negative.js +8 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/examples/scrub.js +10 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/examples/stringify.js +38 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/index.js +267 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/main.js +10 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/package.json +18 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/circular.js +115 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/date.js +35 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/equal.js +220 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/instance.js +17 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/interface.js +42 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/json.js +47 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/keys.js +29 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/leaves.js +21 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/lib/deep_equal.js +92 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/mutability.js +252 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/negative.js +20 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/obj.js +15 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/siblings.js +35 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/stop.js +41 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/stringify.js +36 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/subexpr.js +34 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/super_deep.js +55 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/.npmignore +4 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/README.html +888 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/README.org +463 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/bin/uglifyjs +317 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/docstyle.css +75 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/lib/object-ast.js +75 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/lib/parse-js.js +1341 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/lib/process.js +1949 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/lib/squeeze-more.js +51 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/package.json +22 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/beautify.js +28 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/testparser.js +402 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/array1.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/array2.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/array3.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/array4.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/assignment.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/const.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/if.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue10.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue11.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue13.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue14.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue16.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue17.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue20.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue21.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue25.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue27.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue28.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue29.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue30.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue34.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue4.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue48.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue50.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue53.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue68.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue69.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/issue9.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/mangle.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/var.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/expected/with.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/array1.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/array2.js +4 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/array3.js +4 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/array4.js +6 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/assignment.js +20 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/concatstring.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/const.js +5 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +4 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/forstatement.js +10 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/if.js +6 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +9 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +16 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue10.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue11.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue13.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue14.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue16.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue17.js +4 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue20.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue21.js +6 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue25.js +7 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue27.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue28.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue29.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue30.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue34.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue4.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue48.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue50.js +9 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue53.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue68.js +5 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue69.js +1 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/issue9.js +4 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/mangle.js +5 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/var.js +3 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test/with.js +2 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/test/unit/scripts.js +55 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/tmp/hoist.js +33 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/tmp/instrument.js +97 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/tmp/instrument2.js +138 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/tmp/test.js +16 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/uglify-js.js +17 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/package.json +43 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/server.js +4 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/test/ast.js +29 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/test/err.js +47 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/test/fail.js +8 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/test/fail/src.js +60 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/test/label.js +110 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/test/microwave.js +33 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/test/parent.js +26 -0
- data/lib/holmes/node_modules/detective/node_modules/burrito/test/wrap.js +157 -0
- data/lib/holmes/node_modules/detective/package.json +39 -0
- data/lib/holmes/node_modules/detective/test/both.js +10 -0
- data/lib/holmes/node_modules/detective/test/files/both.js +4 -0
- data/lib/holmes/node_modules/detective/test/files/nested.js +22 -0
- data/lib/holmes/node_modules/detective/test/files/strings.js +13 -0
- data/lib/holmes/node_modules/detective/test/files/word.js +13 -0
- data/lib/holmes/node_modules/detective/test/nested.js +8 -0
- data/lib/holmes/node_modules/detective/test/strings.js +8 -0
- data/lib/holmes/node_modules/detective/test/word.js +11 -0
- data/lib/holmes/require.js +5 -0
- data/lib/holmes/runner.js +20 -0
- data/lib/holmes/version.rb +3 -0
- metadata +223 -0
@@ -0,0 +1 @@
|
|
1
|
+
[],Array(1),[1,2,3]
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a=function(){};return new a(1,2,3,4)})()
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function a(){}return new a(1,2,3,4)})()
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function a(){}(function(){return new a(1,2,3)})()})()
|
@@ -0,0 +1 @@
|
|
1
|
+
a=1,b=a,c=1,d=b,e=d,longname=2;if(longname+1){x=3;if(x)var z=7}z=1,y=1,x=1,g+=1,h=g,++i,j=i,i++,j=i+17
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=a+"a"+"b"+1+c,b=a+"c"+"ds"+123+c,c=a+"c"+123+d+"ds"+c
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=13,b=1/3
|
@@ -0,0 +1 @@
|
|
1
|
+
function bar(){return--x}function foo(){while(bar());}function mak(){for(;;);}var x=5
|
@@ -0,0 +1 @@
|
|
1
|
+
a=func(),b=z;for(a++;i<10;i++)alert(i);var z=1;g=2;for(;i<10;i++)alert(i);var a=2;for(var i=1;i<10;i++)alert(i)
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=1;a==1?a=2:a=17
|
@@ -0,0 +1 @@
|
|
1
|
+
function a(a){return a==1?2:17}
|
@@ -0,0 +1 @@
|
|
1
|
+
function x(a){return typeof a=="object"?a:a===42?0:a*2}function y(a){return typeof a=="object"?a:null}
|
@@ -0,0 +1 @@
|
|
1
|
+
function f(){var a;return(a="a")?a:a}f()
|
@@ -0,0 +1 @@
|
|
1
|
+
new(A,B),new(A||B),new(X?A:B)
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=/^(?:(\w+):)?(?:\/\/(?:(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#])(?::(\d))?)?(..?$|(?:[^?#\/]\/))([^?#]*)(?:\?([^#]))?(?:#(.))?/
|
@@ -0,0 +1 @@
|
|
1
|
+
var a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"}
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=3250441966
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=function(b){b(),a()}
|
@@ -0,0 +1 @@
|
|
1
|
+
a:1
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=0;switch(a){case 0:a++}
|
@@ -0,0 +1 @@
|
|
1
|
+
label1:{label2:break label2;console.log(1)}
|
@@ -0,0 +1 @@
|
|
1
|
+
(a?b:c)?d:e
|
@@ -0,0 +1 @@
|
|
1
|
+
o={".5":.5},o={.5:.5},o={.5:.5}
|
@@ -0,0 +1 @@
|
|
1
|
+
result=function(){return 1}()
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=8,b=4,c=4
|
@@ -0,0 +1 @@
|
|
1
|
+
var a={};a["this"]=1,a.that=2
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=2e3,b=.002,c=2e-5
|
@@ -0,0 +1 @@
|
|
1
|
+
var s,i;s="",i=0
|
@@ -0,0 +1 @@
|
|
1
|
+
function bar(a){try{foo()}catch(b){alert("Exception caught (foo not defined)")}alert(a)}bar(10)
|
@@ -0,0 +1 @@
|
|
1
|
+
x=(y,z)
|
@@ -0,0 +1 @@
|
|
1
|
+
foo+"",a.toString(16),b.toString.call(c)
|
@@ -0,0 +1 @@
|
|
1
|
+
function f(){function b(){}if(a)return;b()}
|
@@ -0,0 +1 @@
|
|
1
|
+
[(a,b)]
|
@@ -0,0 +1 @@
|
|
1
|
+
var a={a:1,b:2}
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a=function b(a,b,c){return b}})()
|
@@ -0,0 +1 @@
|
|
1
|
+
typeof a=="string",b+""!=c+"",d<e==f<g
|
@@ -0,0 +1 @@
|
|
1
|
+
var a=1,b=2
|
@@ -0,0 +1 @@
|
|
1
|
+
with({});
|
@@ -0,0 +1 @@
|
|
1
|
+
function f() { var a; if (a = 'a') { return a; } else { return a; } }; f();
|
@@ -0,0 +1 @@
|
|
1
|
+
var a = /^(?:(\w+):)?(?:\/\/(?:(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#])(?::(\d))?)?(..?$|(?:[^?#\/]\/))([^?#]*)(?:\?([^#]))?(?:#(.))?/;
|
@@ -0,0 +1 @@
|
|
1
|
+
var a = {'\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\'};
|
@@ -0,0 +1 @@
|
|
1
|
+
var a = 0xC1BDCEEE;
|
@@ -0,0 +1 @@
|
|
1
|
+
{a: 1}
|
@@ -0,0 +1 @@
|
|
1
|
+
(a ? b : c) ? d : e
|
@@ -0,0 +1 @@
|
|
1
|
+
result=(function(){ return 1;})()
|
@@ -0,0 +1 @@
|
|
1
|
+
var s, i; s = ''; i = 0;
|
@@ -0,0 +1 @@
|
|
1
|
+
x = (y, z)
|
@@ -0,0 +1 @@
|
|
1
|
+
[(a,b)]
|
@@ -0,0 +1,55 @@
|
|
1
|
+
var fs = require('fs'),
|
2
|
+
uglify = require('uglify-js'),
|
3
|
+
jsp = uglify.parser,
|
4
|
+
nodeunit = require('nodeunit'),
|
5
|
+
path = require('path'),
|
6
|
+
pro = uglify.uglify;
|
7
|
+
|
8
|
+
var Script = process.binding('evals').Script;
|
9
|
+
|
10
|
+
var scriptsPath = __dirname;
|
11
|
+
|
12
|
+
function compress(code) {
|
13
|
+
var ast = jsp.parse(code);
|
14
|
+
ast = pro.ast_mangle(ast);
|
15
|
+
ast = pro.ast_squeeze(ast, { no_warnings: true });
|
16
|
+
ast = pro.ast_squeeze_more(ast);
|
17
|
+
return pro.gen_code(ast);
|
18
|
+
};
|
19
|
+
|
20
|
+
var testDir = path.join(scriptsPath, "compress", "test");
|
21
|
+
var expectedDir = path.join(scriptsPath, "compress", "expected");
|
22
|
+
|
23
|
+
function getTester(script) {
|
24
|
+
return function(test) {
|
25
|
+
var testPath = path.join(testDir, script);
|
26
|
+
var expectedPath = path.join(expectedDir, script);
|
27
|
+
var content = fs.readFileSync(testPath, 'utf-8');
|
28
|
+
var outputCompress = compress(content);
|
29
|
+
|
30
|
+
// Check if the noncompressdata is larger or same size as the compressed data
|
31
|
+
test.ok(content.length >= outputCompress.length);
|
32
|
+
|
33
|
+
// Check that a recompress gives the same result
|
34
|
+
var outputReCompress = compress(content);
|
35
|
+
test.equal(outputCompress, outputReCompress);
|
36
|
+
|
37
|
+
// Check if the compressed output is what is expected
|
38
|
+
var expected = fs.readFileSync(expectedPath, 'utf-8');
|
39
|
+
test.equal(outputCompress, expected.replace(/(\r?\n)+$/, ""));
|
40
|
+
|
41
|
+
test.done();
|
42
|
+
};
|
43
|
+
};
|
44
|
+
|
45
|
+
var tests = {};
|
46
|
+
|
47
|
+
var scripts = fs.readdirSync(testDir);
|
48
|
+
for (var i in scripts) {
|
49
|
+
var script = scripts[i];
|
50
|
+
if (/\.js$/.test(script)) {
|
51
|
+
tests[script] = getTester(script);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
module.exports = nodeunit.testCase(tests);
|
data/lib/holmes/node_modules/detective/node_modules/burrito/node_modules/uglify-js/tmp/hoist.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
function foo(arg1, arg2, arg3, arg4, arg5, arg6) {
|
2
|
+
var a = 5;
|
3
|
+
{
|
4
|
+
var d = 10, mak = 20, buz = 30;
|
5
|
+
var q = buz * 2;
|
6
|
+
}
|
7
|
+
if (moo) {
|
8
|
+
var a, b, c;
|
9
|
+
}
|
10
|
+
for (var arg1 = 0, d = 20; arg1 < 10; ++arg1)
|
11
|
+
console.log(arg3);
|
12
|
+
for (var i in mak) {}
|
13
|
+
for (j in d) {}
|
14
|
+
var d;
|
15
|
+
|
16
|
+
function test() {
|
17
|
+
|
18
|
+
};
|
19
|
+
|
20
|
+
//test();
|
21
|
+
|
22
|
+
(function moo(first, second){
|
23
|
+
console.log(first);
|
24
|
+
})(1);
|
25
|
+
|
26
|
+
(function moo(first, second){
|
27
|
+
console.log(moo());
|
28
|
+
})(1);
|
29
|
+
}
|
30
|
+
|
31
|
+
|
32
|
+
var foo;
|
33
|
+
var bar;
|