MCPcopy Index your code
hub / github.com/Lobos/react-ui / format

Function format

src/utils/strings.js:8–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6}
7
8export function format() {
9 let args = [].slice.call(arguments),
10 str = args.shift();
11 return str.replace(/{(\d+)}/g, function(match, number) {
12 return args[number] !== undefined
13 ? args[number]
14 : match;
15 });
16}
17
18export function substitute(str, obj) {
19 if (typeof str === 'string') {

Callers 4

addFileMethod · 0.90
setHintFunction · 0.90
handleErrorFunction · 0.90
formatValueMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…