Remove strictness of UUID

This commit is contained in:
Nicolas Dextraze 2017-06-05 15:23:27 -07:00
parent f66decdfb3
commit 8735b23bf9
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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);