Skip to content
Almost a random UUID in the browser
JavaScript
Find file
Latest commit 9dc12f7 @janlelis Simplify specs
Failed to load latest commit information.
spec Simplify specs
.gitignore YouYouID.js
.travis.yml
LICENSE.txt Release 1.0
README.md Add travis
bower.json Release 1.0
karma.conf.js YouYouID.js
package.json Release 1.0
yyid.js Use proper UMD

README.md

YYID for JavaScript (Browser) [travis]

  • 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.

Something went wrong with that request. Please try again.