MCPcopy
hub / github.com/esamattis/underscore.string / tmpl

Function tmpl

prune.js:16–18  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

14 if (str.length <= length) return str;
15
16 var tmpl = function(c) {
17 return c.toUpperCase() !== c.toLowerCase() ? 'A' : ' ';
18 },
19 template = str.slice(0, length + 1).replace(/.(?=\W*\w*$)/g, tmpl); // 'Hello, world' -> 'HellAA AAAAA'
20
21 if (template.slice(template.length - 2).match(/\w\w/))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…