A fefe function could return metadata about what it is doing, for example for
import { date } from 'fefe'
const validateReleaseDate = date({ min: new Date() })
the resulting function could offer a function validateReleaseDate.describe() that returns something like
{
params: { min: Date(2019-02-26) },
description: 'A date after 2019-02-26.'
}
The user could also provide a semantic description via
date({ min: new Date(), description: 'The release date.' })
or a function that can use the standard description
date({ min: new Date(), description: msg => `The release date: ${msg}` })
CC @andywer :)
A fefe function could return metadata about what it is doing, for example for
the resulting function could offer a function
validateReleaseDate.describe()that returns something likeThe user could also provide a semantic description via
or a function that can use the standard description
CC @andywer :)