How to use the MAX_SIGNED_VALUE function from long

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

83
84
85
86
87
88
89
90
91
    expect(check.sint32).to.exist;
    expect(check.sint32).to.deep.equal(decoded);
});

it('Can encode the max int64', function () {
    decoded = long.MAX_SIGNED_VALUE;
    encoded = client.encode('Test1', { int64: decoded });
    expect(encoded).to.be.an.instanceof(Buffer);
});
fork icon9
star icon24
watch icon0

+ 11 other calls in file

6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
} else if (!unsigned && value <= -TWO_PWR_63_DBL) {
    return Long.MIN_SIGNED_VALUE;
} else if (unsigned && value <= 0) {
    return Long.MIN_UNSIGNED_VALUE;
} else if (!unsigned && value + 1 >= TWO_PWR_63_DBL) {
    return Long.MAX_SIGNED_VALUE;
} else if (unsigned && value >= TWO_PWR_64_DBL) {
    return Long.MAX_UNSIGNED_VALUE;
} else if (value < 0) {
    return Long.fromNumber(-value, false).negate();
fork icon0
star icon0
watch icon1

+ 12 other calls in file