code: function createFilterFunction (resource) {
    return resource.has instanceof Function
      ? id => resource.has(id)
      : id => resource[id]
  }
docs: Creates a default filter function capable of handling Maps and Objects.