mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-07 23:33:21 +00:00
refactor(codemode): remove unused spread helper (#40729)
This commit is contained in:
parent
887673310b
commit
0df96ddeb0
1 changed files with 0 additions and 10 deletions
|
|
@ -58,13 +58,3 @@ export const setMethods = new Set([
|
|||
"isSupersetOf",
|
||||
"isDisjointFrom",
|
||||
])
|
||||
|
||||
export const spreadItems = (value: unknown): Array<unknown> | undefined => {
|
||||
if (Array.isArray(value)) return value
|
||||
if (typeof value === "string") return Array.from(value)
|
||||
if (value instanceof CodeModeMap) return Array.from(value.map.entries(), ([key, item]) => [key, item])
|
||||
if (value instanceof CodeModeSet) return Array.from(value.set.values())
|
||||
if (value instanceof CodeModeURLSearchParams) return Array.from(value.params.entries(), ([key, item]) => [key, item])
|
||||
return undefined
|
||||
}
|
||||
import { CodeModeMap, CodeModeSet, CodeModeURLSearchParams } from "../values.js"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue