How to use the isLong function from long

Find comprehensive JavaScript long.isLong code examples handpicked from public code repositorys.

98
99
100
101
102
103
104
105
106
107

log.info('Creating two users');
const venueInfo1 = getVenueInfoFromQrCodeV3(qrCode1);
const starTimeUnconverted1 = location1.qrCodePayload.locationData!
    .startTimestamp!;
const startTime1: number = Long.isLong(starTimeUnconverted1) ?
      (starTimeUnconverted1 as Long).toNumber() :
      (starTimeUnconverted1 as number);
const arrivalTime1 = startTime1 + 60 * 60 * 2;
const departureTime1 = arrivalTime1 + 60 * 60 * 1; // stayed for an hour
fork icon7
star icon8
watch icon8

+ 5 other calls in file

185
186
187
188
189
190
191
192
193
194
function isInt(o) {
  return is.integer(o) && o <= MAX_INT && o >= MIN_INT;
}

function isLong(o) {
  return Long.isLong(o) || is.integer(o) && (o > MAX_INT || o < MIN_INT);
}

function isDouble(o) {
  return is.number(o) && !is.integer(o);
fork icon0
star icon10
watch icon12

212
213
214
215
216
217
218
219
220
221
            v,          // The member value.
            length,
            mind = gap,
            partial,
            value = holder[key],
            isLong = value != null && (value instanceof Long || Long.isLong(value));

// If the value has a toJSON method, call it to obtain a replacement value.

        if (value && typeof value === 'object' &&
fork icon1
star icon2
watch icon5