summaryrefslogtreecommitdiff
path: root/includes/external/signal/node_modules/uuid/dist/esm-browser/version.js
blob: 936307630f5ddb07ffdb28e5d343ae12f5e84026 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;