vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
1 lines • 1.28 kB
Source Map (JSON)
{"version":3,"file":"helper.cjs","sources":["../../../components/video/helper.ts"],"sourcesContent":["import { doubleDigits, leaveNumber } from '@vexip-ui/utils'\n\nimport type { IconOptions, IconValue } from '@vexip-ui/config'\n\nexport function formatSeconds(seconds: number) {\n if (seconds <= 0) return '00:00'\n\n const remainders = leaveNumber(Math.ceil(seconds), 60, 2)\n\n if (remainders.length < 2) {\n remainders.unshift(0)\n }\n\n return remainders.length < 3\n ? remainders.map(doubleDigits).join(':')\n : remainders.map((r, i) => (i ? doubleDigits(r) : r)).join(':')\n}\n\nexport function mergeIconScale(scale: number, icon: IconOptions & { icon: IconValue }) {\n return {\n ...icon,\n scale: +(icon.scale || 1) * scale,\n }\n}\n"],"names":["formatSeconds","seconds","remainders","leaveNumber","doubleDigits","mergeIconScale","scale","icon"],"mappings":"mHAIO,SAASA,EAAcC,EAAiB,CACzC,GAAAA,GAAW,EAAU,MAAA,QAEzB,MAAMC,EAAaC,EAAAA,YAAY,KAAK,KAAKF,CAAO,EAAG,GAAI,CAAC,EAEpD,OAAAC,EAAW,OAAS,GACtBA,EAAW,QAAQ,CAAC,EAGfA,EAAW,OAAS,EACvBA,EAAW,IAAIE,cAAY,EAAE,KAAK,GAAG,EACrCF,EAAW,IAAI,CAAC,EAAG,IAAO,EAAIE,EAAAA,aAAa,CAAC,EAAI,CAAE,EAAE,KAAK,GAAG,CAClE,CAEgB,SAAAC,EAAeC,EAAeC,EAAyC,CAC9E,MAAA,CACL,GAAGA,EACH,MAAO,EAAEA,EAAK,OAAS,GAAKD,CAC9B,CACF"}