# all files / lib/ functions.js

100% Statements 17/17
75% Branches 6/8
100% Functions 5/5
100% Lines 16/16

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31

    1×

    1×
    1×

    1×

    1×

    1×

    1×
    12×
    81×

    1×
    60×

    60×
    304×
    304×
    208×

    304×

     'use strict';

    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.negate = negate;
    exports.compose = compose;

    var _lodash = require('lodash');

    var _lodash2 = _interopRequireDefault(_lodash);

    function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

    function negate(fn) {
      return function (args) {
        return !fn(args);
      };
    }

    function compose(args) {
      var functions = _lodash2.default.isFunction(args) ? Array.from(arguments) : args;

      return function (file) {
        var match = true;
        for (var i = 0; i < functions.length; i++) {
          match = match && functions[i](file);
        }
        return match;
      };
    }