aboutsummaryrefslogtreecommitdiff
path: root/src/utility.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utility.js')
-rw-r--r--src/utility.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utility.js b/src/utility.js
index c28077e8..3085fc61 100644
--- a/src/utility.js
+++ b/src/utility.js
@@ -1,15 +1,16 @@
// General JS utilities
function dump(item) {
+ var CHUNK = 500;
function lineify(text) {
var ret = '';
while (text.length > 0) {
- if (text.length < 80) {
+ if (text.length < CHUNK) {
ret += text;
return ret;
}
- var subText = text.substring(60, 80);
- var index = 61+Math.max(subText.indexOf(','), subText.indexOf(']'), subText.indexOf('}'), 21);
+ var subText = text.substring(CHUNK-20, CHUNK);
+ var index = CHUNK-19+Math.max(subText.indexOf(','), subText.indexOf(']'), subText.indexOf('}'), 21);
ret += text.substr(0,index) + '\n';
text = '// ' + text.substr(index);
}