Remove strictness of UUID
This commit is contained in:
parent
f66decdfb3
commit
8735b23bf9
|
@ -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",
|
||||
|
|
|
@ -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…
Reference in New Issue
Block a user