lib/mongoose-hidden.js
function(parts, value) {
  if (parts.length === 0) {
    return value
  }
  let obj = {}
  obj[parts[0]] = partsToValue(parts.slice(1), value)
  return obj
}
function(parts, value) {
  if (parts.length === 0) {
    return value
  }
  let obj = {}
  obj[parts[0]] = partsToValue(parts.slice(1), value)
  return obj
}
function ( parts , value ) { if ( parts . length === 0 ) { return value } let obj = { } obj [ parts [ 0 ] ] = partsToValue ( parts . slice ( 1 ) , value ) return obj }
Convert path parts into a nested object

@access private
@param {array} parts an array of parts on the path
@param {mixed} value the value to set at the end of the path
@returns {object} an object corresponding to the path that the parts represents
Convert path parts into a nested object