MCPcopy Index your code
hub / github.com/code100x/cms / convertToSeconds

Function convertToSeconds

src/components/comment/TimeCodeComment.tsx:22–28  ·  view source on GitHub ↗
(timeCode: string)

Source from the content-addressed store, hash-verified

20 const urlRegex = /((https)?:\/\/[^\s]+)/g;
21
22 const convertToSeconds = (timeCode: string): number => {
23 const parts = timeCode.split(':').reverse().map(Number);
24 return (parts || []).reduce(
25 (acc, part, index) => acc + part * Math.pow(60, index),
26 0,
27 );
28 };
29
30 const processLine = (line: string) => {
31 const elements = [];

Callers 1

processLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected