lib/types/index.js
function uuid(options, buffer, offset) {
  let uuid;
  if (options) {
    if (util.isArray(options.random)) {
      uuid = new Uuid(utils.allocBufferFromArray(options.random));
    }
  }
  if (!uuid) {
    uuid = Uuid.random();
  }
  if (buffer instanceof Buffer) {
    //copy the values into the buffer
    uuid.getBuffer().copy(buffer, offset || 0);
    return buffer;
  }
  return uuid.toString();
}
function uuid(options, buffer, offset) {
  let uuid;
  if (options) {
    if (util.isArray(options.random)) {
      uuid = new Uuid(utils.allocBufferFromArray(options.random));
    }
  }
  if (!uuid) {
    uuid = Uuid.random();
  }
  if (buffer instanceof Buffer) {
    //copy the values into the buffer
    uuid.getBuffer().copy(buffer, offset || 0);
    return buffer;
  }
  return uuid.toString();
}
function uuid ( options , buffer , offset ) { let uuid ; if ( options ) { if ( util . isArray ( options . random ) ) { uuid = new Uuid ( utils . allocBufferFromArray ( options . random ) ) ; } } if ( ! uuid ) { uuid = Uuid . random ( ) ; } if ( buffer instanceof Buffer ) { //copy the values into the buffer uuid . getBuffer ( ) . copy ( buffer , offset || 0 ) ; return buffer ; } return uuid . toString ( ) ; }
<p><strong>Backward compatibility only, use [Uuid]{@link module:types~Uuid} class instead</strong>.</p>
Generate and return a RFC4122 v4 UUID in a string representation.
@deprecated Use [Uuid]{@link module:types~Uuid} class instead
<p > <strong > Backward compatibility only use [ Uuid ] {