Comparing version 0.2.32 to 0.2.33
@@ -79,4 +79,10 @@ /** | ||
export const BITS30: number; | ||
export const BITS31: 2147483647; | ||
export const BITS32: 4294967295; | ||
/** | ||
* @type {number} | ||
*/ | ||
export const BITS31: number; | ||
/** | ||
* @type {number} | ||
*/ | ||
export const BITS32: number; | ||
//# sourceMappingURL=binary.d.ts.map |
@@ -83,3 +83,9 @@ /* eslint-env browser */ | ||
export const BITS30 = BIT31 - 1 | ||
/** | ||
* @type {number} | ||
*/ | ||
export const BITS31 = 0x7FFFFFFF | ||
/** | ||
* @type {number} | ||
*/ | ||
export const BITS32 = 0xFFFFFFFF |
@@ -79,4 +79,10 @@ /** | ||
export const BITS30: number; | ||
export const BITS31: 2147483647; | ||
export const BITS32: 4294967295; | ||
/** | ||
* @type {number} | ||
*/ | ||
export const BITS31: number; | ||
/** | ||
* @type {number} | ||
*/ | ||
export const BITS32: number; | ||
//# sourceMappingURL=binary.d.ts.map |
@@ -12,3 +12,3 @@ export function enqueue(f: () => void): void; | ||
export function idleCallback(cb: Function): TimeoutObject; | ||
export function createDebouncer(timeout: number): (arg0: Function | null) => void; | ||
export function createDebouncer(timeout: number): (arg0: () => void) => void; | ||
export type TimeoutObject = { | ||
@@ -15,0 +15,0 @@ destroy: Function; |
export const MAX_SAFE_INTEGER: number; | ||
export const MIN_SAFE_INTEGER: number; | ||
export const LOWEST_INT32: number; | ||
export const HIGHEST_INT32: 2147483647; | ||
/** | ||
* @type {number} | ||
*/ | ||
export const HIGHEST_INT32: number; | ||
/** | ||
* @module number | ||
@@ -7,0 +10,0 @@ */ |
@@ -76,3 +76,3 @@ /* eslint-env browser */ | ||
export const setAttributesMap = (el, attrs) => { | ||
map.map(attrs, (value, key) => el.setAttribute(key, value)) | ||
attrs.forEach((value, key) => { el.setAttribute(key, value) }) | ||
return el | ||
@@ -79,0 +79,0 @@ } |
@@ -53,3 +53,4 @@ /** | ||
} | ||
} else { | ||
// in ReactNative for example this would not be true (unless connected to the Remote Debugger) | ||
} else if (typeof location === 'object') { | ||
params = map.create() | ||
@@ -64,2 +65,4 @@ // eslint-disable-next-line no-undef | ||
}) | ||
} else { | ||
params = map.create() | ||
} | ||
@@ -66,0 +69,0 @@ } |
@@ -12,3 +12,3 @@ export function enqueue(f: () => void): void; | ||
export function idleCallback(cb: Function): TimeoutObject; | ||
export function createDebouncer(timeout: number): (arg0: Function | null) => void; | ||
export function createDebouncer(timeout: number): (arg0: () => void) => void; | ||
export type TimeoutObject = { | ||
@@ -15,0 +15,0 @@ destroy: Function; |
@@ -96,3 +96,3 @@ /* global requestIdleCallback, requestAnimationFrame, cancelIdleCallback, cancelAnimationFrame */ | ||
* @param {number} timeout Timeout of the debounce action | ||
* @return {function(function | null):void} | ||
* @return {function(function():void):void} | ||
*/ | ||
@@ -104,5 +104,5 @@ export const createDebouncer = timeout => { | ||
if (f) { | ||
timer = setTimeout(f, timeout) | ||
timer = /** @type {any} */ (setTimeout(f, timeout)) | ||
} | ||
} | ||
} |
export const MAX_SAFE_INTEGER: number; | ||
export const MIN_SAFE_INTEGER: number; | ||
export const LOWEST_INT32: number; | ||
export const HIGHEST_INT32: 2147483647; | ||
/** | ||
* @type {number} | ||
*/ | ||
export const HIGHEST_INT32: number; | ||
/** | ||
* @module number | ||
@@ -7,0 +10,0 @@ */ |
@@ -14,2 +14,5 @@ /** | ||
export const LOWEST_INT32 = 1 << 31 | ||
/** | ||
* @type {number} | ||
*/ | ||
export const HIGHEST_INT32 = binary.BITS31 | ||
@@ -16,0 +19,0 @@ |
{ | ||
"name": "lib0", | ||
"version": "0.2.32", | ||
"version": "0.2.33", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -43,3 +43,3 @@ /** | ||
this._fresh = false | ||
return ((state[0] + state[2]) >>> 0) / binary.BITS32 | ||
return ((state[0] + state[2]) >>> 0) / (binary.BITS32 + 1) | ||
} else { | ||
@@ -46,0 +46,0 @@ this._fresh = true |
@@ -15,2 +15,3 @@ import { runTests } from './testing.js' | ||
import * as promise from './promise.test.js' | ||
import * as queue from './queue.test.js' | ||
import * as map from './map.test.js' | ||
@@ -49,2 +50,3 @@ import * as eventloop from './eventloop.test.js' | ||
promise, | ||
queue, | ||
map, | ||
@@ -51,0 +53,0 @@ eventloop, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2146668
510
29861
1261