projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Security update to Drupal 8.4.6
[yaffs-website]
/
node_modules
/
underscore.string
/
truncate.js
1
var makeString = require('./helper/makeString');
2
3
module.exports = function truncate(str, length, truncateStr) {
4
str = makeString(str);
5
truncateStr = truncateStr || '...';
6
length = ~~length;
7
return str.length > length ? str.slice(0, length) + truncateStr : str;
8
};