haifa-reminder/node_modules/uuid/dist/esm-node/version.js

11 lines
200 B
JavaScript
Raw Normal View History

2023-07-26 11:01:58 +00:00
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;