trustwallet-assets/script/generic/tag-values.ts
Adam R 2d771a60b1
Remove unused import; Lint fix (#6039)
Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
2021-03-23 16:33:59 +01:00

19 lines
515 B
TypeScript

import { TagValues } from "../tags-config";
export function isValidTagValue(value: string): boolean {
//console.log(`isValidTagValue ${value}`);
if (!value) {
return false;
}
const tag = TagValues.find(t => t.id === value);
if (!tag) {
return false;
}
//console.log(`TAG ${tag.name}`);
return true;
}
export function isValidTagValues(values: string[]): boolean {
return values.reduce((accum: boolean, value: string) => accum && isValidTagValue(value), true);
}