How does mongoose paginate queries?

  node.js, question

How does mongoose paginate queries? Please explain your thoughts or any good examples, thank you ~

For example, you, you got 12 objects at a time,
Take the id of the last object when opening the next page

modal.find({_id: {$lt: id}}, callback).limit(12)

In this way, the objects of the next 12 databases inside were obtained