UNPKG

@nodescript/stdlib

Version:
21 lines (20 loc) 550 B
import { parseDate } from '../lib/date.js'; export const module = { version: '1.0.5', moduleName: 'Date', description: 'Creates a date object. The value can either be an ISO 8601 formatted string or a number of milliseconds since epoch.', params: { value: { schema: { type: 'any' }, attributes: { valuePlaceholder: 'now', }, }, }, result: { schema: { type: 'any' }, }, }; export const compute = params => { return parseDate(params.value); };