n4auth/node_modules/uuid/dist/esm-browser/version.js
2021-07-15 23:10:20 +03:00

11 lines
200 B
JavaScript

import validate from './validate.js';
function version(uuid) {
if (!validate(uuid)) {
throw TypeError('Invalid UUID');
}
return parseInt(uuid.substr(14, 1), 16);
}
export default version;