MCPcopy
hub / github.com/Splidejs/splide / format

Function format

src/js/utils/string/format/format.ts:12–18  ·  view source on GitHub ↗
( string: string, replacements: string | number | Array<string | number> )

Source from the content-addressed store, hash-verified

10 * @return A formatted string.
11 */
12export function format( string: string, replacements: string | number | Array<string | number> ): string {
13 forEach( replacements, replacement => {
14 string = string.replace( '%s', `${ replacement }` );
15 } );
16
17 return string;
18}

Callers 5

createPaginationFunction · 0.90
mountFunction · 0.90
initNavigationFunction · 0.90
slide.test.tsFile · 0.90
format.test.tsFile · 0.90

Calls 1

forEachFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…