mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
chore: migrate from ts-matches to zod across all TypeScript packages
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { object } from 'ts-matches'
|
||||
|
||||
export function deepEqual(...args: unknown[]) {
|
||||
const objects = args.filter(object.test)
|
||||
const objects = args.filter(
|
||||
(x): x is object => typeof x === 'object' && x !== null,
|
||||
)
|
||||
if (objects.length === 0) {
|
||||
for (const x of args) if (x !== args[0]) return false
|
||||
return true
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { boolean } from 'ts-matches'
|
||||
import { ExtendedVersion } from '../exver'
|
||||
|
||||
export type Vertex<VMetadata = null, EMetadata = null> = {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { arrayOf, string } from 'ts-matches'
|
||||
|
||||
export const splitCommand = (
|
||||
command: string | [string, ...string[]],
|
||||
): string[] => {
|
||||
if (arrayOf(string).test(command)) return command
|
||||
if (Array.isArray(command)) return command
|
||||
return ['sh', '-c', command]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user