bin/array.js
function TypedArray (config) {
    const array = this;

    // validate min items
    if (config.hasOwnProperty('minItems') && (!util.isInteger(config.minItems) || config.minItems < 0)) {
        throw Error('Invalid configuration value for property: minItems. Must be an integer that is greater than or equal to zero. Received: ' + config.minItems);
    }
    const minItems = config.hasOwnProperty('minItems') ? config.minItems : 0;

    // validate max items
    if (config.hasOwnProperty('maxItems') && (!util.isInteger(config.maxItems) || config.maxItems < minItems)) {
        throw Error('Invalid configuration value for property: maxItems. Must be an integer that is greater than or equal to the minItems. Received: ' + config.maxItems);
    }

    // validate schema
    if (config.hasOwnProperty('schema')) config.schema = FullyTyped(config.schema);

    // define properties
    Object.defineProperties(array, {

        maxItems: {
            /**
             * @property
             * @name TypedArray#maxItems
             * @type {number}
             */
            value: Math.round(config.maxItems),
            writable: false
        },

        minItems: {
            /**
             * @property
             * @name TypedArray#minItems
             * @type {number}
             */
            value: Math.round(config.minItems),
            writable: false
        },

        schema: {
            /**
             * @property
             * @name TypedArray#schema
             * @type {object}
             */
            value: config.schema,
            writable: false
        },

        uniqueItems: {
            /**
             * @property
             * @name TypedArray#uniqueItems
             * @type {boolean}
             */
            value: !!config.uniqueItems,
            writable: false
        }

    });

    return array;
}
function TypedArray (config) {
    const array = this;

    // validate min items
    if (config.hasOwnProperty('minItems') && (!util.isInteger(config.minItems) || config.minItems < 0)) {
        throw Error('Invalid configuration value for property: minItems. Must be an integer that is greater than or equal to zero. Received: ' + config.minItems);
    }
    const minItems = config.hasOwnProperty('minItems') ? config.minItems : 0;

    // validate max items
    if (config.hasOwnProperty('maxItems') && (!util.isInteger(config.maxItems) || config.maxItems < minItems)) {
        throw Error('Invalid configuration value for property: maxItems. Must be an integer that is greater than or equal to the minItems. Received: ' + config.maxItems);
    }

    // validate schema
    if (config.hasOwnProperty('schema')) config.schema = FullyTyped(config.schema);

    // define properties
    Object.defineProperties(array, {

        maxItems: {
            /**
             * @property
             * @name TypedArray#maxItems
             * @type {number}
             */
            value: Math.round(config.maxItems),
            writable: false
        },

        minItems: {
            /**
             * @property
             * @name TypedArray#minItems
             * @type {number}
             */
            value: Math.round(config.minItems),
            writable: false
        },

        schema: {
            /**
             * @property
             * @name TypedArray#schema
             * @type {object}
             */
            value: config.schema,
            writable: false
        },

        uniqueItems: {
            /**
             * @property
             * @name TypedArray#uniqueItems
             * @type {boolean}
             */
            value: !!config.uniqueItems,
            writable: false
        }

    });

    return array;
}
function TypedArray ( config ) { const array = this ; // validate min items if ( config . hasOwnProperty ( 'minItems' ) && ( ! util . isInteger ( config . minItems ) || config . minItems < 0 ) ) { throw Error ( 'Invalid configuration value for property: minItems. Must be an integer that is greater than or equal to zero. Received: ' + config . minItems ) ; } const minItems = config . hasOwnProperty ( 'minItems' ) ? config . minItems : 0 ; // validate max items if ( config . hasOwnProperty ( 'maxItems' ) && ( ! util . isInteger ( config . maxItems ) || config . maxItems < minItems ) ) { throw Error ( 'Invalid configuration value for property: maxItems. Must be an integer that is greater than or equal to the minItems. Received: ' + config . maxItems ) ; } // validate schema if ( config . hasOwnProperty ( 'schema' ) ) config . schema = FullyTyped ( config . schema ) ; // define properties Object . defineProperties ( array , { maxItems : { /**
             * @property
             * @name TypedArray#maxItems
             * @type {number}
             */ value : Math . round ( config . maxItems ) , writable : false } , minItems : { /**
             * @property
             * @name TypedArray#minItems
             * @type {number}
             */ value : Math . round ( config . minItems ) , writable : false } , schema : { /**
             * @property
             * @name TypedArray#schema
             * @type {object}
             */ value : config . schema , writable : false } , uniqueItems : { /**
             * @property
             * @name TypedArray#uniqueItems
             * @type {boolean}
             */ value : ! ! config . uniqueItems , writable : false } } ) ; return array ; }
Create a TypedArray instance.
@param {object} config
@returns {TypedArray}
@augments Typed
@constructor
Create a TypedArray instance .