0.1.5 • Published 7 years ago

eddystone-uid v0.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

eddystone-uid

Eddystone UID convertor

Install

$ npm install --save eddystone-uid

Usage

var eddystoneUid = require('eddystone-uid');

eddystoneUid.toBeaconId('123456');
//=> 313233343536

eddystoneUid.toBeaconId('app-id');
//=> 6170702d6964

eddystoneUid.toNamespace('https://goo.gl/r8iJqW');
//=> randomly

eddystoneUid.toNamespace('8b0ca750-e7a7-4e14-bd99-095477cb3e77');
//=> 8b0ca750095477cb3e77

API

toBeaconId(src, encoding)

src

String to Beacon/Instance Id

encoding

Encoding type of Beacon Id, It returns String as encoding in hex other is buf to return raw Buffer

toNamespace(src)

src

Using FQDN or UUID, which will be hashed and then truncated. Please refer more info

License

MIT © ragingwind

0.1.5

7 years ago

0.1.4

8 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago