agsamantha/node_modules/uuid/dist/esm-node/version.js
2024-10-02 15:15:21 -05:00

8 lines
No EOL
197 B
JavaScript

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