.gitea
assets
content
data
layouts
static
admin
config
links
previews
field-previews
components
index.js
truncate.js
body-preview.js
boolean-preview.js
count-preview.js
date-preview.js
draft-preview.js
index.js
page-previews
shortcodes
icons.js
index.html
media
schulchronik
favicon.ico
.editorconfig
.gitattributes
.gitignore
.mailmap
LICENSE
config.yml
go.mod
go.sum
renovate.json
10 lines
153 B
JavaScript
10 lines
153 B
JavaScript
function truncate(str, num) {
|
|
if (str.length > num) {
|
|
return str.slice(0, num) + "...";
|
|
} else {
|
|
return str;
|
|
}
|
|
}
|
|
|
|
export default truncate;
|