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

Function constructor

js/botasaurus-server-js/src/sorts.ts:9–21  ·  view source on GitHub ↗
(
    public field: string,
    options: {
      label?: string | null;
      isDefault?: boolean;
    } = {}
  )

Source from the content-addressed store, hash-verified

7
8abstract class BaseSort {
9 constructor(
10 public field: string,
11 options: {
12 label?: string | null;
13 isDefault?: boolean;
14 } = {}
15 ) {
16 this.label = options.label || null;
17 this.isDefault = options.isDefault || false;
18 this.reverse = false;
19 const className = snakeCase(this.getClassName());
20 this.id = `${field}_${className}`;
21 }
22
23 protected reverse: boolean;
24 public id: string;

Callers

nothing calls this directly

Calls 2

snakeCaseFunction · 0.90
getClassNameMethod · 0.45

Tested by

no test coverage detected