YYID for JavaScript (Browser) ![[travis]](https://camo.githubusercontent.com/9fc5cf7b411d214e95f553520946c3bd2fe4174b/68747470733a2f2f7472617669732d63692e6f72672f6a616e6c656c69732f797969642e6a732e706e67)
- Generates a random string in UUID#4 format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - In contrast to RFC 4122, it uses all digits (128bit)
- Uses a crytographically solid source of randomness: crypto.getRandomValues
- See yyid-node for a server-side (node.js) version
Install
npm
$ npm install yyid
Bower
$ bower install yyid
script file
Copy yyid.js
Usage
Use with your favorite build tool or directly via browser global:
<script src="/path/to/yyid.js"></script>
<script>
yyid(); // => 'ee1c3727-d589-729b-4ad9-a37f77173730'
</script>Other Versions
YYID is available for more languages, such as Ruby, Elixir, or Rust.
![[travis]](https://travis-ci.org/janlelis/yyid.js.png)