Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
import { Pipe, PipeTransform } from '@angular/core'
import { dJs } from '../utils/time'
@Pipe({ name: 'amAdd' })
export class TimeAddPipe implements PipeTransform {
transform(value: any, amount: any, unit?: any): any {
if (typeof amount === 'undefined' || (typeof amount === 'number' && typeof unit === 'undefined')) {
throw new Error('TimeAddPipe: missing required arguments')
}
return dJs(value).add(amount, unit)
}
}