wishthis/node_modules/uuid/dist/esm-node/version.js
2022-08-31 16:34:36 +02:00

11 lines
No EOL
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;