source:
frontend/node_modules/uuid/dist/esm-node/version.js
| Last change on this file was 9af201e, checked in by , 12 days ago | |
|---|---|
|
|
| File size: 200 bytes | |
| Line | |
|---|---|
| 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.
