Skip to content

A simple wrapper around the native iOS and Android UUID classes

License

Notifications You must be signed in to change notification settings

ThePJMP/react-native-uuid-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-uuid-generator

A simple wrapper around the native iOS and Android UUID classes. Exposes a single method, getRandomUUID.

Forked from: https://github.com/Traviskn/react-native-uuid-generator

Getting started

Requires react > 0.60 for auto linking

Add to packages.json "react-native-uuid-generator": "github:cristianoccazinsp/react-native-uuid-generator"

Usage

This library supports both callback and promise interfaces.

import UUIDGenerator from 'react-native-uuid-generator';

// Callback interface
UUIDGenerator.getRandomUUID((uuid) => {
  console.log(uuid);
});
// => "42A8A87A-F71C-446B-B81D-0CD16A709625"

// Promise interface
UUIDGenerator.getRandomUUID().then((uuid) => {
  console.log(uuid);
});
// => "BD6120BD-3612-4D56-8957-99F5D6F02C52"

About

A simple wrapper around the native iOS and Android UUID classes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 54.9%
  • Ruby 19.4%
  • Objective-C 13.9%
  • JavaScript 11.8%