MCPcopy Create free account
hub / github.com/ThatGuySam/doesitarm / total

Method total

helpers/api/pagination.js:25–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 }
24
25 get total () {
26 // Catch errors if the list is not an array or a function
27 if ( !Array.isArray( this.list ) ) {
28 throw new Error(`List must be an array or a function but is ${typeof list}`)
29 }
30
31 return this.list.length
32 }
33
34 get pageCount () {
35 return Math.ceil( this.total / this.perPage )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected