ducktype.js
function createCombi (types, options) {
    var tests = types.map(function (type) {
      return ducktype(type).test;
    });

    return new DuckType({
      name: options && options.name || null,
      test: function test (object) {
        for (var i = 0, ii = tests.length; i < ii; i++) {
          if (tests[i](object)) {
            return true;
          }
        }
        return false;
      }
    });
  }
function createCombi (types, options) {
    var tests = types.map(function (type) {
      return ducktype(type).test;
    });

    return new DuckType({
      name: options && options.name || null,
      test: function test (object) {
        for (var i = 0, ii = tests.length; i < ii; i++) {
          if (tests[i](object)) {
            return true;
          }
        }
        return false;
      }
    });
  }
function createCombi ( types , options ) { var tests = types . map ( function ( type ) { return ducktype ( type ) . test ; } ) ; return new DuckType ( { name : options && options . name || null , test : function test ( object ) { for ( var i = 0 , ii = tests . length ; i < ii ; i ++ ) { if ( tests [ i ] ( object ) ) { return true ; } } return false ; } } ) ; }
Create a ducktype handling a combination of types
@param {Array} types
@param {{name: String}} [options]
@returns {*}
Create a ducktype handling a combination of types