Skip to main content

Limit

Limit the number of documents returned from the collection.

Method Signature

public limit(value: number): this;

Example

const users = await aggregate.limit(10).get();

It will return the first 10 documents from documents.