function parseOptions(options) {
    let limit = options.limit ?? 5;
    let order = options.order ?? 'created_at desc';
    let filter = options.filter ?? '';
    let page = options.page ?? 1;

    return {
        limit,
        order,
        filter,
        page
    };
}
Parse Options

@param {Object} options
@returns {*}