MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / getFormattedLabel

Function getFormattedLabel

ui/media/js/image-modifiers.js:61–67  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

59 const cardLabel = removeBy ? name.replace("by ", "") : name
60
61 function getFormattedLabel(length) {
62 if (cardLabel?.length <= length) {
63 return cardLabel
64 } else {
65 return cardLabel.substring(0, length) + "..."
66 }
67 }
68
69 modifierCard.dataset.fullName = name // preserve the full name
70 regularLabel.dataset.fullName = name // preserve the full name, legacy support for older plugins

Callers 1

createModifierCardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected