lib/store.js
function wrapData(target, name, value, rawBuffer, cast) {
  var converted = false;
  var val;
  if (!target.hasOwnProperty(name)) {
    if (value === null || value === undefined || (rawBuffer === true && Buffer.isBuffer(value))) {
      converted = true;
      val = value;
    }
    Object.defineProperty(target, name, {
      get: function() {
        if (!converted) {
          val = convertValue(value, cast);
          converted = true;
        }
        return val;
      },
      enumerable: true,
    });
  }
}
function wrapData(target, name, value, rawBuffer, cast) {
  var converted = false;
  var val;
  if (!target.hasOwnProperty(name)) {
    if (value === null || value === undefined || (rawBuffer === true && Buffer.isBuffer(value))) {
      converted = true;
      val = value;
    }
    Object.defineProperty(target, name, {
      get: function() {
        if (!converted) {
          val = convertValue(value, cast);
          converted = true;
        }
        return val;
      },
      enumerable: true,
    });
  }
}
function wrapData ( target , name , value , rawBuffer , cast ) { var converted = false ; var val ; if ( ! target . hasOwnProperty ( name ) ) { if ( value === null || value === undefined || ( rawBuffer === true && Buffer . isBuffer ( value ) ) ) { converted = true ; val = value ; } Object . defineProperty ( target , name , { get : function ( ) { if ( ! converted ) { val = convertValue ( value , cast ) ; converted = true ; } return val ; } , enumerable : true , } ) ; } }
Generate a property to lazily convert a Buffer value

@param   {Object}    target      Target object
@param   {String}    name        Property name
@param   {*}         value       Property value
@param   {Boolean}   rawBuffer   true to return a raw buffer
@param   {Boolean}   cast        true to cast the value
Generate a property to lazily convert a Buffer value