MCPcopy
hub / github.com/watsonbox/exportify / slice

Method slice

src/components/data/PlaylistsData.ts:33–43  ·  view source on GitHub ↗
(start: number, end: number)

Source from the content-addressed store, hash-verified

31 }
32
33 async slice(start: number, end: number) {
34 await this.loadSlice(start, end)
35 await this.loadLikedTracksPlaylist()
36
37 // It's a little ugly, but we slip in liked tracks with the first slice
38 if (start === 0) {
39 return [this.likedTracksPlaylist, ...this.data.slice(start, end).filter(p => p)]
40 } else {
41 return this.data.slice(start, end).filter(p => p)
42 }
43 }
44
45 async all() {
46 await this.loadAll()

Callers 5

PlaylistTableClass · 0.80
dataMethod · 0.80
loadSliceMethod · 0.80
dataMethod · 0.80
dataMethod · 0.80

Calls 2

loadSliceMethod · 0.95

Tested by

no test coverage detected