lib/types/time-uuid.js
function TimeUuid(value, ticks, nodeId, clockId) {
  let buffer;
  if (value instanceof Buffer) {
    if (value.length !== 16) {
      throw new Error('Buffer for v1 uuid not valid');
    }
    buffer = value;
  }
  else {
    buffer = generateBuffer(value, ticks, nodeId, clockId);
  }
  Uuid.call(this, buffer);
}
function TimeUuid(value, ticks, nodeId, clockId) {
  let buffer;
  if (value instanceof Buffer) {
    if (value.length !== 16) {
      throw new Error('Buffer for v1 uuid not valid');
    }
    buffer = value;
  }
  else {
    buffer = generateBuffer(value, ticks, nodeId, clockId);
  }
  Uuid.call(this, buffer);
}
Creates a new instance of Uuid based on the parameters provided according to rfc4122.
If any of the arguments is not provided, it will be randomly generated, except for the date that will use the current
date.
<p>
Note that when nodeId and/or clockId portions are not provided, the constructor will generate them using
<code>crypto.randomBytes()</code>. As it's possible that <code>crypto.randomBytes()</code> might block, it's
recommended that you use the callback-based version of the static methods <code>fromDate()</code> or
<code>now()</code> in that case.
</p>
@class
@classdesc Represents an immutable version 1 universally unique identifier (UUID). A UUID represents a 128-bit value.
<p>Usage: <code>TimeUuid.now()</code></p>
@extends module:types~Uuid
@param {Date} [value] The datetime for the instance, if not provided, it will use the current Date.
@param {Number} [ticks] A number from 0 to 10000 representing the 100-nanoseconds units for this instance to fill in the information not available in the Date,
as Ecmascript Dates have only milliseconds precision.
@param {String|Buffer} [nodeId] A 6-length Buffer or string of 6 ascii characters representing the node identifier, ie: 'host01'.
@param {String|Buffer} [clockId] A 2-length Buffer or string of 6 ascii characters representing the clock identifier.
@constructor