Giter Site home page Giter Site logo

dart-uuid's Introduction

uuid

Version 4.0.x is a complete redesign of the underlying setup, but tries to be API compatible or similar to 3.x.

UuidValue is still Experimental and the API for it is in flux, please pay attention to changelogs and versions.

Build Status

Simple, fast generation of RFC4122 UUIDs.

Features:

  • Generate RFC4122 version 1, version 4, or version 5 UUIDs
  • Supports draft version 6, version 7, and version 8
  • Runs in web, server, and flutter
  • Cryptographically strong random number generation on all platforms
    • Defaults to non-crypto generator, see UuidUtil for cryptoRNG
  • Documentation

Getting Started

Instructions

  1. Open a command line and cd to your projects root folder
  2. In your pubspec, add an entry for dart-uuid to your dependencies (example below)
  3. pub install
  4. If you wish to run tests, go into packages/dart-uuid/ and run 'dart test/uuid_test.dart'

Pubspec

There are 2 options. Directly from git, or from pub.dartlang.org

pub.dartlang.org: (you can use 'any' instead of a version if you just want the latest always)

dependencies:
  uuid: ^4.0.0-beta1
import 'package:uuid/uuid.dart';

var uuid = Uuid();

Then create some ids ...

// Generate a v1 (time-based) id
uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'

// Generate a v4 (random) id
uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'

// Generate a v5 (namespace-name-sha1-based) id
uuid.v5(Uuid.NAMESPACE_URL, 'www.google.com'); // -> 'c74a196f-f19d-5ea9-bffd-a2742432fc9c'

Documentation

For documentation, please visit the Documentation page. Examples are included for most functions and classes.

For more complex examples and other usages, please look at the tests.

Release notes

See CHANGELOG

dart-uuid's People

Contributors

daegalus avatar thomasuster avatar hambergerpls avatar simolus3 avatar frankmuehlschlegel avatar florianulivi avatar jcollins-g avatar priezz avatar caioflandau avatar devoncarew avatar edman avatar harryterkelsen avatar julemand101 avatar jodinathan avatar luanpotter avatar enyo avatar nex3 avatar reedlabotz avatar spencerc avatar gitter-badger avatar jhsware avatar

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.