(text: Buffer | string, length = 8)
| 1128 | export const blankReplacer = (match: string): string => ' '.repeat(match.length) |
| 1129 | |
| 1130 | export function getHash(text: Buffer | string, length = 8): string { |
| 1131 | const h = crypto.hash('sha256', text, 'hex').substring(0, length) |
| 1132 | if (length <= 64) return h |
| 1133 | return h.padEnd(length, '_') |
| 1134 | } |
| 1135 | |
| 1136 | export function emptyCssComments(raw: string): string { |
| 1137 | return raw.replace(multilineCommentsRE, blankReplacer) |
no outgoing calls
no test coverage detected