Browse Source

Remove strictness of UUID

v4_proto
Nicolas Dextraze 5 years ago
parent
commit
8735b23bf9
  1. 2
      package.json
  2. 2
      src/eventData.js

2
package.json

@ -1,6 +1,6 @@
{
"name": "node-eventstore-client",
"version": "0.1.2",
"version": "0.1.3",
"description": "A port of the EventStore .Net ClientAPI to Node.js",
"main": "index.js",
"types": "index.d.ts",

2
src/eventData.js

@ -1,6 +1,6 @@
var uuid = require('uuid');
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
function isValidId(id) {
if (typeof id !== 'string') return false;
return uuidRegex.test(id);

Loading…
Cancel
Save