MCPcopy Create free account
hub / github.com/api-platform/website / sortByPosition

Function sortByPosition

pwa/utils/index.tsx:4–9  ·  view source on GitHub ↗
(
  a: { position: number },
  b: { position: number }
)

Source from the content-addressed store, hash-verified

2import { versions, current } from "consts";
3
4export function sortByPosition(
5 a: { position: number },
6 b: { position: number }
7): number {
8 return a.position - b.position;
9}
10
11export function sortByTitle(a: { title: string }, b: { title: string }) {
12 if (a.title > b.title) return 1;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected