Giter VIP home page Giter VIP logo

inugami's Introduction

inugami

An Erlang/OTP library for generating universally unique identifiers (UUID), as defined in RFC 4122. That includes versions 1, 3, 4, and 5 of the specification. Named after the dog god of Japanese folklore, for no particular reason.

Requirements

Building and Testing

$ rebar3 compile
$ rebar3 ct

Example Usage

Including as a dependency in your release, using rebar...

{deps, [
    {inugami, {git, "https://github.com/nlfiedler/inugami", {tag, "1.0.0"}}}
]}.

Be sure to include inugami in the included_applications list of your application configuration before building a release.

Generating a version 1 UUID and extracting properties from it...

> Uuid = inugami:uuid1().
{uuid,<<191,7,211,198>>,
      <<118,19>>,
      <<17,230>>,
      <<"£">>,<<"Ã">>,
      <<0,62,225,194,211,88>>}
> inugami:get_version(Uuid).
1
> inugami:get_variant(Uuid).
variant_rfc4122
> inugami:get_node(Uuid).
<<"00:3e:e1:c2:d3:58">>
> inugami:get_timestamp(Uuid).
{1473,373786,279623}
> inugami:encode(Uuid).
<<"bf07d3c6-7613-11e6-a3c3-003ee1c2d358">>
> inugami:to_string(compact, Uuid).
"bf07d3c6761311e6a3c3003ee1c2d358"

License

BSD 3-Clause, see the LICENSE file.

inugami's People

Contributors

nlfiedler avatar

Watchers

 avatar  avatar  avatar

inugami's Issues

Publish on hex.pm

Seems like a good idea to make this library more easily discoverable. The hex.pm site seems an obvious choice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.