Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 859 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 859 Bytes

jsonata-moment

NPM statistics

Build Status

Moment.js support for JSONata.

How to install

npm install @elastic.io/jsonata-moment

Usage

$moment function provides the same functionality, as regular moment() does.

In node.js

const jsonataMoment = require('@elastic.io/jsonata-moment');
const result = jsonataMoment('$moment().format("YYYY-MM-DD")').evaluate();

In browser

There is a regular as well as minified versions of the library in a dist folder.

const result = window.jsonataMoment('$moment().format("YYYY-MM-DD")').evaluate();