MCPcopy Create free account
hub / github.com/DavidWells/analytics / renderPlatformSentence

Function renderPlatformSentence

scripts/docs.js:339–348  ·  view source on GitHub ↗
(platforms)

Source from the content-addressed store, hash-verified

337}
338
339function renderPlatformSentence(platforms) {
340 const NICE_NAMES = {
341 'Browser': 'the browser',
342 'Node.js': 'server-side in Node.js'
343 }
344
345 return platforms.map((x) => {
346 return `[${NICE_NAMES[x]}](#${getPlatformNiceName(x)}-usage)`
347 }).join(' and ')
348}
349
350function formatCode(code, type = 'babel') {
351 return prettier.format(code, { semi: false, singleQuote: true, parser: type })

Callers 1

mainUsageBlockFunction · 0.85

Calls 1

getPlatformNiceNameFunction · 0.85

Tested by

no test coverage detected