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

Method getSortKey

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

Source from the content-addressed store, hash-verified

143
144class FalseFirstSort extends BaseSort {
145 protected override getSortKey(): (item: any) => number {
146 return (item: any) => {
147 const value = item[this.field];
148 return value === false ? 0 : value === true ? 1 : 2;
149 };
150 }
151
152 protected getLabel(): string {
153 const titleCasedField = titleCase(this.field);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected