src/check-types.js
function like (data, archetype) {
    var name;

    for (name in archetype) {
      if (archetype.hasOwnProperty(name)) {
        if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof archetype[name]) {
          return false;
        }

        if (object(data[name]) && like(data[name], archetype[name]) === false) {
          return false;
        }
      }
    }

    return true;
  }
function like (data, archetype) {
    var name;

    for (name in archetype) {
      if (archetype.hasOwnProperty(name)) {
        if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof archetype[name]) {
          return false;
        }

        if (object(data[name]) && like(data[name], archetype[name]) === false) {
          return false;
        }
      }
    }

    return true;
  }
function like ( data , archetype ) { var name ; for ( name in archetype ) { if ( archetype . hasOwnProperty ( name ) ) { if ( data . hasOwnProperty ( name ) === false || typeof data [ name ] !== typeof archetype [ name ] ) { return false ; } if ( object ( data [ name ] ) && like ( data [ name ] , archetype [ name ] ) === false ) { return false ; } } } return true ; }
Public function `like`.

Tests whether `data` 'quacks like a duck'. Returns true if `data` has all
of the properties of `archetype` (the 'duck'), false otherwise.
Public function like .