index.js
function setVirtuals(schema, paths) {
  paths.forEach(path => {
    const props = path.options.virtual.properties;

    if (props[path.path]) {
      schema.virtual(props[path.path]).get(function() {
        return path.enumValues;
      });
    }
  });
}
function setVirtuals(schema, paths) {
  paths.forEach(path => {
    const props = path.options.virtual.properties;

    if (props[path.path]) {
      schema.virtual(props[path.path]).get(function() {
        return path.enumValues;
      });
    }
  });
}
function setVirtuals ( schema , paths ) { paths . forEach ( path => { const props = path . options . virtual . properties ; if ( props [ path . path ] ) { schema . virtual ( props [ path . path ] ) . get ( function ( ) { return path . enumValues ; } ) ; } } ) ; }
Setup virtual properties for the document
Setup virtual properties for the document