forked from quic-issues/427e7578-d7bf-49c8-aee9-2dd999e25316
implemented frontend including separate message system; started to implement backend
This commit is contained in:
64
yjs-poll/node_modules/lib0/dist/number-1fb57bba.cjs
generated
vendored
Normal file
64
yjs-poll/node_modules/lib0/dist/number-1fb57bba.cjs
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
'use strict';
|
||||
|
||||
var math = require('./math-96d5e8c4.cjs');
|
||||
var binary = require('./binary-ac8e39e2.cjs');
|
||||
|
||||
/**
|
||||
* Utility helpers for working with numbers.
|
||||
*
|
||||
* @module number
|
||||
*/
|
||||
|
||||
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
|
||||
const MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER;
|
||||
|
||||
const LOWEST_INT32 = 1 << 31;
|
||||
const HIGHEST_INT32 = binary.BITS31;
|
||||
const HIGHEST_UINT32 = binary.BITS32;
|
||||
|
||||
/* c8 ignore next */
|
||||
const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && math.floor(num) === num);
|
||||
const isNaN = Number.isNaN;
|
||||
const parseInt = Number.parseInt;
|
||||
|
||||
/**
|
||||
* Count the number of "1" bits in an unsigned 32bit number.
|
||||
*
|
||||
* Super fun bitcount algorithm by Brian Kernighan.
|
||||
*
|
||||
* @param {number} n
|
||||
*/
|
||||
const countBits = n => {
|
||||
n &= binary.BITS32;
|
||||
let count = 0;
|
||||
while (n) {
|
||||
n &= (n - 1);
|
||||
count++;
|
||||
}
|
||||
return count
|
||||
};
|
||||
|
||||
var number = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER,
|
||||
MIN_SAFE_INTEGER: MIN_SAFE_INTEGER,
|
||||
LOWEST_INT32: LOWEST_INT32,
|
||||
HIGHEST_INT32: HIGHEST_INT32,
|
||||
HIGHEST_UINT32: HIGHEST_UINT32,
|
||||
isInteger: isInteger,
|
||||
isNaN: isNaN,
|
||||
parseInt: parseInt,
|
||||
countBits: countBits
|
||||
});
|
||||
|
||||
exports.HIGHEST_INT32 = HIGHEST_INT32;
|
||||
exports.HIGHEST_UINT32 = HIGHEST_UINT32;
|
||||
exports.LOWEST_INT32 = LOWEST_INT32;
|
||||
exports.MAX_SAFE_INTEGER = MAX_SAFE_INTEGER;
|
||||
exports.MIN_SAFE_INTEGER = MIN_SAFE_INTEGER;
|
||||
exports.countBits = countBits;
|
||||
exports.isInteger = isInteger;
|
||||
exports.isNaN = isNaN;
|
||||
exports.number = number;
|
||||
exports.parseInt = parseInt;
|
||||
//# sourceMappingURL=number-1fb57bba.cjs.map
|
||||
Reference in New Issue
Block a user