(platforms)
| 337 | } |
| 338 | |
| 339 | function 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 | |
| 350 | function formatCode(code, type = 'babel') { |
| 351 | return prettier.format(code, { semi: false, singleQuote: true, parser: type }) |
no test coverage detected