agsamantha/node_modules/uuid/dist/esm-browser/version.js

8 lines
197 B
JavaScript
Raw Normal View History

2024-10-02 15:15:21 -05: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;