Buckets:
| export function css( | |
| strings: TemplateStringsArray, | |
| ...keys: readonly string[] | |
| ): string { | |
| const lastIndex = strings.length - 1 | |
| const str = | |
| // Convert template literal into a single line string | |
| strings.slice(0, lastIndex).reduce((p, s, i) => p + s + keys[i], '') + | |
| strings[lastIndex] | |
| return ( | |
| str | |
| // Remove comments | |
| .replace(/\/\*[\s\S]*?\*\//g, '') | |
| // Remove whitespace, tabs, and newlines | |
| .replace(/\s+/g, ' ') | |
| // Remove spaces before and after semicolons, and spaces after commas | |
| .replace(/\s*([:;,{}])\s*/g, '$1') | |
| // Remove extra semicolons | |
| .replace(/;+}/g, '}') | |
| // Trim leading and trailing whitespaces | |
| .trim() | |
| ) | |
| } | |
Xet Storage Details
- Size:
- 709 Bytes
- Xet hash:
- 91c9e0b58a3e27a791e0a3bb6795b95dcc40315f8200501c22a8517a67200737
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.