MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / normalizeTrailingColon

Function normalizeTrailingColon

scripts/i18n.js:217–225  ·  view source on GitHub ↗
(str, sourceStr = '')

Source from the content-addressed store, hash-verified

215}
216
217function normalizeTrailingColon(str, sourceStr = '') {
218 if (sourceStr.endsWith(': ') && str.endsWith(':')) {
219 return str + ' ';
220 }
221 if (sourceStr.endsWith(':') && str.endsWith(': ')) {
222 return str.slice(0, -1);
223 }
224 return str;
225}
226
227module.exports = {
228 extract,

Callers 1

getDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected