Tag: uuid

  • Create GUID / Create UUID in JavaScript

    Javascript create guid

    Generate uuid

    Most server-side languages and databases provide built-in support for UUIDs (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDentifier). At the time of writing JavaScript does not, so let’s create our own UUID generator with JavaScript array.

    There are a few other examples out there that use random numbers and date parts; however, I found this solution that leverages window.crypto.getRandomValues. There are also of course of few libraries out there, most notably node-uuid (npm install uuid) for your universally unique identifier, but sometimes it’s fun to create things on our own for experimentation with the crypto api to generate UUID.

    (more…)