This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var input = [doc askForUserInput:"Total copies:" initialValue:'']); | |
var count = parseInt(input); | |
var quit = input == null; | |
while (count != count) { | |
if (quit) break; | |
input = [doc askForUserInput:"Please enter an actual number for copies:" initialValue:'']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handlebars.registerHelper('truncate', function(length, value, opts) { | |
// Make sure value exists | |
if (value != null) { | |
// Don't truncate if already short | |
if (value.length <= length) { | |
return value; | |
} | |
// Truncate to length and add ellipsis | |
return value.substring(0, length) + '...'; |