Skip to content

toggleSortField

Overview

Flip the direction of base in place within the sort order. No-op (returns a copy) when base is absent; other entries keep their position and direction.

Signature

toggleSortField(sorted, base)

Parameters

NameTypeRequiredDescription
sortedstring[]yesThe sort order.
basestringyesThe base field name to toggle.

Returns

string[]

A fresh array.

Source

client/lib/utils/sortedFields.js:145

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