mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 16:25:21 +00:00
Added implementation for setBeacons along with some tests
This commit is contained in:
@@ -245,3 +245,14 @@ export function getValidated<T extends Object>(
|
||||
|
||||
return validation.value;
|
||||
}
|
||||
|
||||
export function filterValid<T extends Object>(
|
||||
source: T[],
|
||||
schema: AvailableSchemas,
|
||||
): T[] {
|
||||
if (!source) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return source.filter((current) => isValid(current, schema));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user