MCPcopy Create free account
hub / github.com/wevm/viem / toStringLiteral

Function toStringLiteral

scripts/generateTokenlist.ts:367–373  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

365}
366
367function toStringLiteral(value: string) {
368 return `'${value
369 .replaceAll('\\', '\\\\')
370 .replaceAll("'", "\\'")
371 .replaceAll('\n', '\\n')
372 .replaceAll('\r', '\\r')}'`
373}
374
375function getDefinitionExports(tokenDefinitions: TokenDefinition[]) {
376 const generatedExports = tokenDefinitions.map((token) => token.importName)

Callers 1

getTokenDefinitionSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected