UNPKG

@onereach/channel-transformer

Version:

Convert data model between different channels (Slack, Microsoft Teams, Generic...)

10 lines (9 loc) 329 B
import { IGenericLocation } from "../../../generic/types"; import { IZendeskContent } from "../../types"; export const transformLocation = ({ props }: IGenericLocation): IZendeskContent => ({ type: 'location', coordinates: { lat: Number(props?.value[0]) || 0, long: Number(props?.value[1]) || 0 } });