Build a normalized InboundLocation, or undefined when the coordinates are missing, not finite or out of range (latitude −90…90, longitude −180…180). Numeric strings are accepted; empty name/address strings are dropped; live is set only when true.
undefined
name
address
live
true
const location = toInboundLocation({ latitude: msg.location?.latitude, longitude: msg.location?.longitude, name: msg.location?.name }) Copy
const location = toInboundLocation({ latitude: msg.location?.latitude, longitude: msg.location?.longitude, name: msg.location?.name })
Build a normalized InboundLocation, or
undefinedwhen the coordinates are missing, not finite or out of range (latitude −90…90, longitude −180…180). Numeric strings are accepted; emptyname/addressstrings are dropped;liveis set only whentrue.