# Code coverage report for Livewire/lib/route.js

## Statements: 45.45% (10 / 22) Branches: 16.67% (3 / 18) Functions: 33.33% (3 / 9) Lines: 45.45% (10 / 22) Ignored: none

All files » Livewire/lib/ » route.js

    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
    32
    33
    34
    35
    36
    37
    38
    391
    1
    1
    1

    1

    1

    1
    1

    1

    1

     (function(){
      var ref$, Some, None, compact, id, route, out$ = typeof exports != 'undefined' && exports || this;
      ref$ = require('fantasy-options'), Some = ref$.Some, None = ref$.None;
      compact = curry$(function(rs, a){
        var o;
        switch (false) {
        case rs.length !== 0:
          return None;
        case !((o = rs[0](a)) instanceof Some):
          return o;
        default:
          return compact(rs.slice(1), a);
        }
      });
      id = function(it){
        return it;
      };
      out$.route = route = function(fallback, rs){
        return function(){
          return function(it){
            return it.fold(id, fallback);
          }(compact(rs).apply(this, arguments));
        };
      };
      function curry$(f, bound){
        var context,
        _curry = function(args) {
          return f.length > 1 ? function(){
            var params = args ? args.concat() : [];
            context = bound ? context || this : this;
            return params.push.apply(params, arguments) <
                f.length && arguments.length ?
              _curry.call(context, params) : f.apply(context, params);
          } : f;
        };
        return _curry();
      }
    }).call(this);