lib/index.js
function gpsTimestampToUtcTimestamp(gpsTimestamp) {
  // Get lastIndex for which our gpsTimestamp is greater
  var lastIndex = void 0;
  for (lastIndex = 0; lastIndex < gpsLeapSeconds.length; ++lastIndex) {
    if (gpsTimestamp - gpsLeapSeconds[lastIndex] > 0) {
      break;
    }
  }

  var leapSecondsOffset = gpsLeapSeconds.length - lastIndex;

  return new Date(gpsTimestamp.getTime() - leapSecondsOffset * 1000);
}
function gpsTimestampToUtcTimestamp(gpsTimestamp) {
  // Get lastIndex for which our gpsTimestamp is greater
  var lastIndex = void 0;
  for (lastIndex = 0; lastIndex < gpsLeapSeconds.length; ++lastIndex) {
    if (gpsTimestamp - gpsLeapSeconds[lastIndex] > 0) {
      break;
    }
  }

  var leapSecondsOffset = gpsLeapSeconds.length - lastIndex;

  return new Date(gpsTimestamp.getTime() - leapSecondsOffset * 1000);
}
function gpsTimestampToUtcTimestamp ( gpsTimestamp ) { // Get lastIndex for which our gpsTimestamp is greater var lastIndex = void 0 ; for ( lastIndex = 0 ; lastIndex < gpsLeapSeconds . length ; ++ lastIndex ) { if ( gpsTimestamp - gpsLeapSeconds [ lastIndex ] > 0 ) { break ; } } var leapSecondsOffset = gpsLeapSeconds . length - lastIndex ; return new Date ( gpsTimestamp . getTime ( ) - leapSecondsOffset * 1000 ) ; }
Convert GPS timestamp without leap seconds to a UTC timestamps with leap seconds.

@param {Date} timestamp - A `moment` object representing a GPS timestamp, w/o leap-seconds.
@returns {Date} - A `moment` object representing a UTC timestamp, with leap-seconds.
Convert GPS timestamp without leap seconds to a UTC timestamps with leap seconds .