source:
trip-planner-front/node_modules/uuid/dist/esm-browser/version.js@
eed0bf8
Last change on this file since eed0bf8 was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 200 bytes |
Rev | Line | |
---|---|---|
[6a3a178] | 1 | import validate from './validate.js'; |
2 | ||
3 | function version(uuid) { | |
4 | if (!validate(uuid)) { | |
5 | throw TypeError('Invalid UUID'); | |
6 | } | |
7 | ||
8 | return parseInt(uuid.substr(14, 1), 16); | |
9 | } | |
10 | ||
11 | export default version; |
Note:
See TracBrowser
for help on using the repository browser.