How to use the UUID function from bson

Find comprehensive JavaScript bson.UUID code examples handpicked from public code repositorys.

48
49
50
51
52
53
54
55
56
.. code-block:: javascript

   const { UUID } = require('bson');
   ...
   const client = new MongoClient(uri, { 
     pkFactory: { createPk: () =>  new UUID().toBinary() }
   });

.. note:: Data Consistency
fork icon32
star icon8
watch icon19