uglifier 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of uglifier might be problematic. Click here for more details.

@@ -0,0 +1,22 @@
1
+ var jsp = require("./parse-js"),
2
+ pro = require("./process"),
3
+ slice = jsp.slice,
4
+ member = jsp.member,
5
+ PRECEDENCE = jsp.PRECEDENCE,
6
+ OPERATORS = jsp.OPERATORS;
7
+
8
+ function ast_squeeze_more(ast) {
9
+ var w = pro.ast_walker(), walk = w.walk;
10
+ return w.with_walkers({
11
+ "call": function(expr, args) {
12
+ if (expr[0] == "dot" && expr[2] == "toString" && args.length == 0) {
13
+ // foo.toString() ==> foo+""
14
+ return [ "binary", "+", expr[1], [ "string", "" ]];
15
+ }
16
+ }
17
+ }, function() {
18
+ return walk(ast);
19
+ });
20
+ };
21
+
22
+ exports.ast_squeeze_more = ast_squeeze_more;
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uglifier
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 1
10
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ville Lautanala
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-27 00:00:00 Z
18
+ date: 2011-05-12 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -23,10 +23,12 @@ dependencies:
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- hash: 3
26
+ hash: 19
27
27
  segments:
28
28
  - 0
29
- version: "0"
29
+ - 3
30
+ - 0
31
+ version: 0.3.0
30
32
  name: execjs
31
33
  prerelease: false
32
34
  type: :runtime
@@ -41,7 +43,7 @@ dependencies:
41
43
  segments:
42
44
  - 0
43
45
  version: "0"
44
- name: json
46
+ name: multi_json
45
47
  prerelease: false
46
48
  type: :runtime
47
49
  requirement: *id002
@@ -131,6 +133,9 @@ files:
131
133
  - spec/spec_helper.rb
132
134
  - spec/uglifier_spec.rb
133
135
  - uglifier.gemspec
136
+ - vendor/uglifyjs/lib/parse-js.js
137
+ - vendor/uglifyjs/lib/process.js
138
+ - vendor/uglifyjs/lib/squeeze-more.js
134
139
  homepage: http://github.com/lautis/uglifier
135
140
  licenses: []
136
141