src/check-types.js
function instance (data, prototype) {
    try {
      return instanceStrict(data, prototype) ||
        data.constructor.name === prototype.name ||
        Object.prototype.toString.call(data) === '[object ' + prototype.name + ']';
    } catch (error) {
      return false;
    }
  }
function instance (data, prototype) {
    try {
      return instanceStrict(data, prototype) ||
        data.constructor.name === prototype.name ||
        Object.prototype.toString.call(data) === '[object ' + prototype.name + ']';
    } catch (error) {
      return false;
    }
  }
function instance ( data , prototype ) { try { return instanceStrict ( data , prototype ) || data . constructor . name === prototype . name || Object . prototype . toString . call ( data ) === '[object ' + prototype . name + ']' ; } catch ( error ) { return false ; } }
Public function `instance`.

Returns true if `data` is an instance of `prototype`, false otherwise.
Falls back to testing constructor.name and Object.prototype.toString
if the initial instanceof test fails.
Public function instance .