diff --git a/README.md b/README.md index d59a4fd9f3e57eb7535b8bff487f9f9d3acc0e6d..7972a6f49ec93f5aa33858a95506e5340a9294dd 100644 --- a/README.md +++ b/README.md @@ -109,9 +109,9 @@ AppleHealthKit.initHealthKit(null: Object, (err: string, res: Object) => { ... - let options = {value: 200}; + let options = { value: 200 }; AppleHealthKit.saveWeight(options: Object, (err: Object, res: Object) => { - if(err){ + if (err) { console.log("error saving weight to healthkit: ", err); return; } diff --git a/constants.js b/constants.js index 34427d01440163742b4b910b5c8bfc8edc26523c..4b74d04303b8b88c6ac3f8fd904a7c0a767b4f31 100644 --- a/constants.js +++ b/constants.js @@ -1,5 +1,9 @@ 'use strict' +/** + * Apple Health Permissions + * @type {Object} + */ const PERMISSIONS = { DateOfBirth: 'DateOfBirth', BiologicalSex: 'BiologicalSex', @@ -28,7 +32,9 @@ const PERMISSIONS = { SleepAnalysis: 'SleepAnalysis', }; - +/** + * Unit Request Types + */ const UNITS = { gram: 'gram', pound: 'pound', @@ -52,8 +58,6 @@ const UNITS = { mgPerdL: 'mgPerdL', }; - - const CONSTANTS = { Permissions: PERMISSIONS, Units: UNITS,