UNPKG

@flourd/toml

Version:

Familiar parse and stringify for TOML, with a CLI to convert to/from JSON.

11 lines (10 loc) 197 B
'use strict' module.exports = value => { const date = new Date(value) /* istanbul ignore if */ if (isNaN(date)) { throw new TypeError('Invalid Datetime') } else { return date } }