mirror of
https://github.com/typicode/json-server.git
synced 2025-07-29 21:23:41 +08:00
lint
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
module.exports = {
|
||||
getPage
|
||||
getPage,
|
||||
}
|
||||
|
||||
function getPage(array, page, perPage) {
|
||||
var obj = {}
|
||||
var start = (page - 1) * perPage
|
||||
var end = page * perPage
|
||||
const obj = {}
|
||||
const start = (page - 1) * perPage
|
||||
const end = page * perPage
|
||||
|
||||
obj.items = array.slice(start, end)
|
||||
if (obj.items.length === 0) {
|
||||
|
Reference in New Issue
Block a user