src/index.js
function(parallels = 1) {
    this._parallels = parallels || 1;

    /**
     * _queueCounter
     * each lock() increased this number
     * each unlock() decreases this number
     * If _qC==0, the state is in idle
     * @type {Number}
     */
    this._qC = 0;

    /**
     * _idleCalls
     * contains all promises that where added via requestIdlePromise()
     * and not have been resolved
     * @type {Set<Promise>} _iC with oldest promise first
     */
    this._iC = new Set();

    /**
     * _lastHandleNumber
     * @type {Number}
     */
    this._lHN = 0;

    /**
     * _handlePromiseMap
     * Contains the handleNumber on the left
     * And the assigned promise on the right.
     * This is stored so you can use cancelIdleCallback(handleNumber)
     * to stop executing the callback.
     * @type {Map<Number><Promise>}
     */
    this._hPM = new Map();
    this._pHM = new Map(); // _promiseHandleMap
}
function(parallels = 1) {
    this._parallels = parallels || 1;

    /**
     * _queueCounter
     * each lock() increased this number
     * each unlock() decreases this number
     * If _qC==0, the state is in idle
     * @type {Number}
     */
    this._qC = 0;

    /**
     * _idleCalls
     * contains all promises that where added via requestIdlePromise()
     * and not have been resolved
     * @type {Set<Promise>} _iC with oldest promise first
     */
    this._iC = new Set();

    /**
     * _lastHandleNumber
     * @type {Number}
     */
    this._lHN = 0;

    /**
     * _handlePromiseMap
     * Contains the handleNumber on the left
     * And the assigned promise on the right.
     * This is stored so you can use cancelIdleCallback(handleNumber)
     * to stop executing the callback.
     * @type {Map<Number><Promise>}
     */
    this._hPM = new Map();
    this._pHM = new Map(); // _promiseHandleMap
}
function ( parallels = 1 ) { this . _parallels = parallels || 1 ; /**
     * _queueCounter
     * each lock() increased this number
     * each unlock() decreases this number
     * If _qC==0, the state is in idle
     * @type {Number}
     */ this . _qC = 0 ; /**
     * _idleCalls
     * contains all promises that where added via requestIdlePromise()
     * and not have been resolved
     * @type {Set<Promise>} _iC with oldest promise first
     */ this . _iC = new Set ( ) ; /**
     * _lastHandleNumber
     * @type {Number}
     */ this . _lHN = 0 ; /**
     * _handlePromiseMap
     * Contains the handleNumber on the left
     * And the assigned promise on the right.
     * This is stored so you can use cancelIdleCallback(handleNumber)
     * to stop executing the callback.
     * @type {Map<Number><Promise>}
     */ this . _hPM = new Map ( ) ; this . _pHM = new Map ( ) ; // _promiseHandleMap }
Creates a new Idle-Queue
@constructor
@param {number} [parallels=1] amount of parrallel runs of the limited-ressource
Creates a new Idle - Queue