@kingstinct/react-native-healthkit
Version:
React Native bindings for HealthKit
17 lines (13 loc) • 422 B
text/typescript
import { CategoryTypes } from '../modules'
import type { CategoryTypeIdentifier } from '../types/CategoryTypeIdentifier'
export async function getCategorySampleById<T extends CategoryTypeIdentifier>(
identifier: T,
uuid: string,
) {
const samples = await CategoryTypes.queryCategorySamples(identifier, {
limit: 1,
filter: { uuids: [uuid] },
})
return samples[0]
}
export default getCategorySampleById