import { Duration , DurationInput } from './types' ; import { isNegative } from './isNegative' ; import { negate } from './negate' ; import { parse } from './parse' ; example export const abs = ( duration ) : Duration => { if ( isNegative ( duration ) ) { return negate ( duration ) ; } return parse ( duration ) ; } ;