UNPKG

axiodb

Version:

A blazing-fast, lightweight, and scalable nodejs package based DBMS for modern application. Supports schemas, encryption, and advanced query capabilities.

23 lines (22 loc) 694 B
/** * Class representing a sorting utility. */ export default class Sorting { private readonly arr; private readonly query; /** * Create a Sorting instance. * @param arr - The array to be sorted. * @param query - The query object containing the sorting key and order. */ constructor(arr: any[], query: { [s: string]: unknown; } | ArrayLike<unknown>); /** * Sort the array based on the query. * @param arr - The array to be sorted. * @param query - The query object containing the sorting key and order. * @returns A promise that resolves to the sorted array. */ sort(aditionalField?: string): Promise<any[]>; }