Skip to content

addSortField

Overview

Append base to the sort order. No-op (returns a copy) when base is already present.

Signature

addSortField(sorted, base, options)

Parameters

NameTypeRequiredDescription
sortedstring[]yesThe sort order.
basestringyesThe base field name to add.
optionsobjectnoInitial direction; ascending by default.

options Properties

NameTypeRequiredDefaultDescription
descendingbooleanno

Returns

string[]

A fresh array.

Source

client/lib/utils/sortedFields.js:119

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2