bin/middleware.js
function Middleware(name) {
    if (!(this instanceof Middleware)) return new Middleware(name);
    this.name = name || '';

    Object.defineProperty(this, '_', {
        enumerable: false,
        configurable: false,
        value: {
            length: 0,
            ordered: null,
            weights: new Map()
        }
    });

    /**
     * Returns the length of the middleware.
     * @type {number}
     */
    Object.defineProperty(this, 'length', {
        get: () => this._.length
    });
}
function Middleware(name) {
    if (!(this instanceof Middleware)) return new Middleware(name);
    this.name = name || '';

    Object.defineProperty(this, '_', {
        enumerable: false,
        configurable: false,
        value: {
            length: 0,
            ordered: null,
            weights: new Map()
        }
    });

    /**
     * Returns the length of the middleware.
     * @type {number}
     */
    Object.defineProperty(this, 'length', {
        get: () => this._.length
    });
}
function Middleware ( name ) { if ( ! ( this instanceof Middleware ) ) return new Middleware ( name ) ; this . name = name || '' ; Object . defineProperty ( this , '_' , { enumerable : false , configurable : false , value : { length : 0 , ordered : null , weights : new Map ( ) } } ) ; /**
     * Returns the length of the middleware.
     * @type {number}
     */ Object . defineProperty ( this , 'length' , { get : ( ) => this . _ . length } ) ; }
Create a new middleware instance.
@params {string} [name='']
@returns {Middleware}
@constructor
Create a new middleware instance .