function all(assertions){
    if (!assertions) {
        throw new Error('assertions undefined')
    }

    assertions = Array.isArray(assertions) ? assertions : [assertions];

    return function(item){
        return assertions.reduce(function(prev, assertion){
            if (!prev) { return false; }

            return assertion(item);
        }, true);
    }
}

module.exports = all;