jsinstrument 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,9 +100,9 @@
100
100
 
101
101
  for (var file in data) {
102
102
  var file_json = [];
103
-
104
- for (var i in TYPES) {
105
- var type = TYPES[i];
103
+
104
+ for (var i in this.TYPES) {
105
+ var type = this.TYPES[i];
106
106
  var type_coverage = data[file][type];
107
107
 
108
108
  var array = [];
@@ -142,6 +142,9 @@
142
142
  return r;
143
143
  },
144
144
  _quote: function(s) {
145
+ var pad = function(s) {
146
+ return '0000'.substr(s.length) + s;
147
+ }
145
148
  return '"' + s.replace(/[\u0000-\u001f"\\\u007f-\uffff]/g, function (c) {
146
149
  switch (c) {
147
150
  case '\b': return '\\b';
@@ -151,13 +154,10 @@
151
154
  case '\t': return '\\t';
152
155
  case '"': return '\\"';
153
156
  case '\\': return '\\\\';
154
- default: return '\\u' + this._pad(c.charCodeAt(0).toString(16));
157
+ default: return '\\u' + pad(c.charCodeAt(0).toString(16));
155
158
  }
156
159
  }) + '"';
157
- },
158
- _pad: function(s) {
159
- return '0000'.substr(s.length) + s;
160
- },
160
+ }
161
161
  };
162
162
  }
163
163
 
@@ -1,3 +1,3 @@
1
1
  module JSInstrument
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsinstrument
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: