'use strict';

var traverse = require('./util/traverse');

var deref = require('deref');

module.exports = function(schema, refs) {
  return traverse(deref()(schema, refs, true));
};

'use strict';

var traverse = require('./util/traverse');

var deref = require('deref');

module.exports = function(schema, refs) {
  var $ = deref();

  if (Array.isArray(refs)) {
    return traverse($(schema, refs, true));
  } else {
    $.refs = refs || {};
  }

  return traverse($(schema, true));
};

Allow array or object for refs; fix
Allow array or object for refs; fix
