src/fluxter.js
function checkArgumentType(argument, position, type) {
    let wrongTypeOf = typeof argument !== type;
    let isCheckObject = type === 'object';
    let n = isCheckObject ? 'n' : '';
    if (isCheckObject && (wrongTypeOf || argument.constructor !== Object) || wrongTypeOf) {
        throw new TypeError('A ' + position + ' argument must be a' + n + ' ' + type + '.');
    }
}
function checkArgumentType(argument, position, type) {
    let wrongTypeOf = typeof argument !== type;
    let isCheckObject = type === 'object';
    let n = isCheckObject ? 'n' : '';
    if (isCheckObject && (wrongTypeOf || argument.constructor !== Object) || wrongTypeOf) {
        throw new TypeError('A ' + position + ' argument must be a' + n + ' ' + type + '.');
    }
}
function checkArgumentType ( argument , position , type ) { let wrongTypeOf = typeof argument !== type ; let isCheckObject = type === 'object' ; let n = isCheckObject ? 'n' : '' ; if ( isCheckObject && ( wrongTypeOf || argument . constructor !== Object ) || wrongTypeOf ) { throw new TypeError ( 'A ' + position + ' argument must be a' + n + ' ' + type + '.' ) ; } }
Check type of argument
@function checkArgumentType
@param {*} argument
@param {String} position - first, second, ...
@param {String} type - string, function, ...
@throws {TypeError}
@private
Check type of argument