UNPKG

restify-model

Version:

'A surprisingly useful model/collection adapter that builds routes and handles CRUD operations (Create, Read, Update and Delete). Works with any custom database adapter (Postgres, MySQL, MongoDB, etc.).'

12 lines (8 loc) 285 B
"use strict"; module.exports = exports = function() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(character) { var rand = Math.random() * 16 | 0; var value = character === 'x' ? rand : (rand & 0x3 | 0x8); return value.toString(16); }); }