noinfopath-bson-timestamp

Makes BSON Timestamps usable.

Usage no npm install needed!

<script type="module">
  import noinfopathBsonTimestamp from 'https://cdn.skypack.dev/noinfopath-bson-timestamp';
</script>

README

NoInfoPath BSON Timestamp

NPM

NPM

This module provide two useful functions for converting a BSON Timestamp object to a Unix Epoc timestamp, and back again.

Install

    npm install noinfopath-bson-timestamp --save

Usage

    var unixTimestamp = NoBSONTimestamp.toNumber(timestamp),
        bsonTimestamp = NoBSONTimestamp.fromNumber(tsn);

Dependecies

This module requires the following dependencies:

    npm install mongodb --save