mirror of
https://github.com/supabase/supabase.git
synced 2026-05-28 08:21:43 +08:00
* clean circular deps in telemetry * clean circular deps in command * fix commandmenu circular deps * rm deps.json * fix consent circular dep * fix TOC circular deps * fix wrong import path * fix test types * fix missing fn * undo let change * fix consent component * empty
16 lines
352 B
TypeScript
16 lines
352 B
TypeScript
import { ICommandSection } from './types'
|
|
|
|
const toSectionId = (str: string) => str.toLowerCase().replace(/\s+/g, '-')
|
|
|
|
const section$new = (
|
|
name: string,
|
|
{ forceMount = false, id }: { forceMount?: boolean; id?: string } = {}
|
|
): ICommandSection => ({
|
|
id: id ?? toSectionId(name),
|
|
name,
|
|
forceMount,
|
|
commands: [],
|
|
})
|
|
|
|
export { section$new }
|