MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / getSortKey

Method getSortKey

js/botasaurus-server-js/src/sorts.ts:127–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125
126class TrueFirstSort extends BaseSort {
127 protected override getSortKey(): (item: any) => number {
128 return (item: any) => {
129 const value = item[this.field];
130 return value === true ? 0 : value === false ? 1 : 2;
131 };
132 }
133
134 protected getLabel(): string {
135 const titleCasedField = titleCase(this.field);

Callers 1

applyInPlaceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected