Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@tuft/utils

tuftjs15MIT1.0.0-alpha3TypeScript support: included

Various utility functions used by other components of TuftJS.

tuft, tuftjs, utils

readme

Node.js CI Coverage Status Known Vulnerabilities

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"