MCPcopy Create free account
hub / github.com/subquery/subql / isValidEnum

Function isValidEnum

packages/cli/src/utils/utils.ts:134–136  ·  view source on GitHub ↗
(enumType: T, input: string)

Source from the content-addressed store, hash-verified

132}
133
134export function isValidEnum<T extends Record<string, string>>(enumType: T, input: string): input is T[keyof T] {
135 return Object.values(enumType).includes(input);
136}
137
138export function findReplace(manifest: string, replacer: RegExp, value: string): string {
139 return manifest.replace(replacer, value);

Callers 1

validate.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected