lib/mongoose-hidden.js
function shouldCopyVirtual(schema, key, options, target) {
  return (
    schema.pathType(key) === 'virtual'
    && [hide, `hide${target}`].indexOf(options.virtuals[key]) === -1
  )
}
function shouldCopyVirtual(schema, key, options, target) {
  return (
    schema.pathType(key) === 'virtual'
    && [hide, `hide${target}`].indexOf(options.virtuals[key]) === -1
  )
}
function shouldCopyVirtual ( schema , key , options , target ) { return ( schema . pathType ( key ) === 'virtual' && [ hide , ` ${ target } ` ] . indexOf ( options . virtuals [ key ] ) === - 1 ) }
Should a virtual property by be hidden er not

@access private
@param {Schema} schema a mongoose schema
@param {string} key object key name
@param {object} options a set of options
@param {string} target the target to test, e.g 'JSON'
@returns {Boolen} true of pathname should be hidden
Should a virtual property by be hidden er not