@tuft/utils
v1.0.0-alpha3
Published
Various utility functions used by other components of TuftJS.
Downloads
5
Readme
Various utility functions used by other components of TuftJS.
Install with npm
npm i @tuft/utils
stringifyDate
Converts a JavaScript Date
object to a JSON string.
Syntax
stringifyDate(value: Date | null): string
Usage
const { stringifyDate } = require('@tuft/utils');
const date = new Date('January 1, 2020 01:02:03 UTC');
stringifyDate(date); // "2020-01-01T01:02:03.000Z"