tailwind-ctp-intellisense/packages/tailwindcss-language-service/src/util/naturalExpand.ts

5 lines
197 B
TypeScript
Raw Normal View History

export function naturalExpand(value: number, total?: number): string {
let length = typeof total === 'number' ? total.toString().length : 8
return ('0'.repeat(length) + value).slice(-length)
2020-04-27 22:18:28 +00:00
}