UNPKG

@kingstinct/react-native-healthkit

Version:
16 lines (15 loc) 980 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _nativeTypes = _interopRequireDefault(require("../native-types")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } async function saveQuantitySample(identifier, unit, value, options) { const start = (options === null || options === void 0 ? void 0 : options.start) || (options === null || options === void 0 ? void 0 : options.end) || new Date(); const end = (options === null || options === void 0 ? void 0 : options.end) || (options === null || options === void 0 ? void 0 : options.start) || new Date(); const metadata = (options === null || options === void 0 ? void 0 : options.metadata) || {}; return _nativeTypes.default.saveQuantitySample(identifier, unit, value, start.toISOString(), end.toISOString(), metadata); } var _default = exports.default = saveQuantitySample; //# sourceMappingURL=saveQuantitySample.js.map