code: function embed (resource, e) {
      e && [].concat(e)
        .forEach(function (externalResource) {
          if (db.get(externalResource).value) {
            var query = {}
            var singularResource = pluralize.singular(name)
            query[singularResource + 'Id'] = resource.id
            resource[externalResource] = db.get(externalResource).filter(query).value()
          }
        })
    }
docs: Embed function used in GET /name and GET /name/id