crop.js 288 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 define(['../lang/toString', './truncate'], function (toString, truncate) { /** * Truncate string at full words. */ function crop(str, maxChars, append) { str = toString(str); return truncate(str, maxChars, append, true); } return crop; });