nl_tokens: <p > <strong > Backward compatibility only use [ TimeUuid ] {
pl_tokens: function timeuuid ( options , buffer , offset ) { let date ; let ticks ; let nodeId ; let clockId ; if ( options ) { if ( typeof options . msecs === 'number' ) { date = new Date ( options . msecs ) ; } if ( options . msecs instanceof Date ) { date = options . msecs ; } if ( util . isArray ( options . node ) ) { nodeId = utils . allocBufferFromArray ( options . node ) ; } if ( typeof options . clockseq === 'number' ) { clockId = utils . allocBufferUnsafe ( 2 ) ; clockId . writeUInt16BE ( options . clockseq , 0 ) ; } if ( typeof options . nsecs === 'number' ) { ticks = options . nsecs ; } } const uuid = new TimeUuid ( date , ticks , nodeId , clockId ) ; if ( buffer instanceof Buffer ) { //copy the values into the buffer uuid . getBuffer ( ) . <mask> ( buffer , offset || 0 ) ; return buffer ; } return uuid . toString ( ) ; }