reql-to-moment
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

reql-to-moment

GratiPay Downloads Version

A helper function to convert raw ReQL time object to moment.js preserving time zone information. This is useful for reading raw time objects from RethinkDB.

Installation

reql-to-moment expects that you have already installed moment.

npm instal --save-dev reql-to-moment

Usage

import reqlToMoment from 'reql-to-moment';

reqlToMoment({
  $reql_type$: 'TIME',
  epoch_time: 1286730000,
  timezone: '-07:00',
});
// returns moment.js object

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i reql-to-moment

Weekly Downloads

0

Version

1.1.1

License

ISC

Last publish

Collaborators

  • alexgorbatchev