/firebase-pushid-convert-timestamp

Convert your Firebase Realtime Database PushID to timestamp's number.

Primary LanguageJavaScriptMIT LicenseMIT

Firebase Realtime Database PushID Convert Timestamp

Build Status Coverage Status

Convert your Firebase Realtime Database PushID to timestamp's number.

Installation

npm install @jengjeng/firebase-pushid-convert-timestamp

Usage

var decodeFirebasePushID = require('@jengjeng/firebase-pushid-convert-timestamp');

var firebasePushID = '-KwKoJBVZO4fJt2_6vgJ';
var output = decodeFirebasePushID(firebasePushID);

Output should be {"timestamp":1507899556640,"randomness":2.685256451527677e+21}

Tests

npm test

Contributing

Add your functions and unit tests for any new or changed functionality. Lint and test your code.