MCPcopy Index your code
hub / github.com/github/relative-time-element / abs

Method abs

src/duration.ts:45–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43 }
44
45 abs() {
46 return new Duration(
47 Math.abs(this.years),
48 Math.abs(this.months),
49 Math.abs(this.weeks),
50 Math.abs(this.days),
51 Math.abs(this.hours),
52 Math.abs(this.minutes),
53 Math.abs(this.seconds),
54 Math.abs(this.milliseconds),
55 )
56 }
57
58 static from(durationLike: unknown): Duration {
59 if (typeof durationLike === 'string') {

Callers 7

duration.tsFile · 0.80
compareMethod · 0.80
elapsedTimeFunction · 0.80
roundToSingleUnitFunction · 0.80
getUnitFactorFunction · 0.80
#getDurationFormatMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected