PATH:
usr
/
local
/
lib
/
node_modules
/
bower
/
lib
/
node_modules
/
mout
/
src
/
string
define(['../lang/toString', './trim'], function(toString, trim){ /** * Limit number of chars. */ function truncate(str, maxChars, append, onlyFullWords){ str = toString(str); append = append || '...'; maxChars = onlyFullWords? maxChars + 1 : maxChars; str = trim(str); if(str.length <= maxChars){ return str; } str = str.substr(0, maxChars - append.length); //crop at last space or remove trailing whitespace str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); return str + append; } return truncate; });
[-] unescapeHtml.js
[edit]
[-] underscore.js
[edit]
[-] lowerCase.js
[edit]
[-] lpad.js
[edit]
[-] removeNonASCII.js
[edit]
[-] camelCase.js
[edit]
[+]
..
[-] truncate.js
[edit]
[-] upperCase.js
[edit]
[-] contains.js
[edit]
[-] WHITE_SPACES.js
[edit]
[-] hyphenate.js
[edit]
[-] insert.js
[edit]
[-] unhyphenate.js
[edit]
[-] replaceAccents.js
[edit]
[-] endsWith.js
[edit]
[-] sentenceCase.js
[edit]
[-] rtrim.js
[edit]
[-] escapeRegExp.js
[edit]
[-] properCase.js
[edit]
[-] rpad.js
[edit]
[-] replace.js
[edit]
[-] normalizeLineBreaks.js
[edit]
[-] escapeUnicode.js
[edit]
[-] crop.js
[edit]
[-] ltrim.js
[edit]
[-] startsWith.js
[edit]
[-] pascalCase.js
[edit]
[-] trim.js
[edit]
[-] removeNonWord.js
[edit]
[-] escapeHtml.js
[edit]
[-] slugify.js
[edit]
[-] stripHtmlTags.js
[edit]
[-] typecast.js
[edit]
[-] unCamelCase.js
[edit]
[-] interpolate.js
[edit]
[-] repeat.js
[edit]
[-] makePath.js
[edit]
[-] unescapeUnicode.js
[edit]