{"version":3,"file":"ms.cjs","names":[],"sources":["../src/ms/units-to-ms.ts","../src/ms/ms.ts"],"sourcesContent":["export const unitsToMs = {\n  ms: 1,\n  sec: 1000,\n  min: 1000 * 60,\n  hour: 1000 * 60 * 60,\n  day: 1000 * 60 * 60 * 24,\n  week: 1000 * 60 * 60 * 24 * 7,\n} as const;\n","import { unitsToMs } from './units-to-ms.js';\n\n/**\n * Converts a value in the specified unit to milliseconds.\n *\n * @example\n * ```ts\n * ms(1, 'min') // 60_000\n * ms(30, 'sec') // 30_000\n * ```\n */\nexport const ms = (value: number, unit: keyof typeof unitsToMs = 'ms') =>\n  value * unitsToMs[unit];\n"],"mappings":";;AAAA,IAAa,YAAY;CACvB,IAAI;CACJ,KAAK;CACL,KAAK,MAAO;CACZ,MAAM,MAAO,KAAK;CAClB,KAAK,MAAO,KAAK,KAAK;CACtB,MAAM,MAAO,KAAK,KAAK,KAAK;AAC9B;;;;;;;;;;;;ACIA,IAAa,MAAM,OAAe,OAA+B,SAC/D,QAAQ,UAAU"}