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
7
8
8
+ 5 other calls in file
GitHub: ali-sdk/ali-mc
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);
0
10
12
GitHub: unscrambl/json-long
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' &&
1
2
5
long.default is the most popular function in long (905 examples)