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'
@Pipe({
name: 'paginate'
})
export class PaginatePipe implements PipeTransform {
transform(items: any[], page: number = 1, itemsPerPage: number): any[] {
if (!items?.length) {
return []
}
const start = (page - 1) * itemsPerPage
return items.slice(start, start + itemsPerPage)
}
}