src/types/hexadecimal.js
function Uuid (validator, serializer, factory) {
  const size = 16
  const name = 'Uuid'

  function cleaner (value) {
    return String(value).replace(/-/g, '')
  }

  validator = validator.bind(null, name, size)
  serializer = serializer((value) => validator(cleaner(value)))

  return factory(serializer, size, name)
}
function Uuid (validator, serializer, factory) {
  const size = 16
  const name = 'Uuid'

  function cleaner (value) {
    return String(value).replace(/-/g, '')
  }

  validator = validator.bind(null, name, size)
  serializer = serializer((value) => validator(cleaner(value)))

  return factory(serializer, size, name)
}
function Uuid ( validator , serializer , factory ) { const size = 16 const name = 'Uuid' function cleaner ( value ) { return String ( value ) . replace ( / - / g , '' ) } validator = validator . bind ( null , name , size ) serializer = serializer ( ( value ) => validator ( cleaner ( value ) ) ) return factory ( serializer , size , name ) }
Uuid type factory

@param {function(name, size, value)} validator hexadecimal validator
@param {function(validator, value, buffer, from)} encoder function accepting validator, value, buffer, position and returns modified buffer
@param {function(serizalizer, size, name)} factory type builder factory
@returns {Object} hex type
@private
Uuid type factory