MCPcopy Create free account
hub / github.com/antfu/utils / slash

Function slash

src/string.ts:8–10  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

6 * @category String
7 */
8export function slash(str: string) {
9 return str.replace(/\\/g, '/')
10}
11
12/**
13 * Ensure prefix of a string

Callers 1

string.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected