MCPcopy
hub / github.com/vuejs/core / toMs

Function toMs

packages/runtime-dom/src/components/Transition.ts:472–476  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

470// If comma is not replaced with a dot, the input will be rounded down
471// (i.e. acting as a floor function) causing unexpected behaviors
472function toMs(s: string): number {
473 // #8409 default value for CSS durations can be 'auto'
474 if (s === 'auto') return 0
475 return Number(s.slice(0, -1).replace(',', '.')) * 1000
476}
477
478// synchronously force layout to put elements into a certain state
479export function forceReflow(el?: Node): number {

Callers 1

getTimeoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected