You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type coercions can be provided by a convert function in the args array.
import{easyConfig}from'@elite-libs/auto-config';// Example ValidatorsconstparsePort=port=>(port=parseInt(port??1234,10),port>1000&&port<60000 ? port : null);constparseAcctId=input=>zod.any(input).refine(Number).safeParse(input)?.data;exportconstconfig=easyConfig({"siteUrl": ['--site-url','SITE_URL'],"port": ['--port','PORT',parsePort],"accountId": ['--accountId','-a',parseAcctId],});
Post-MVP Stretch / Future Goal
Options
Support type annotations and constraint tokens (starting with !, @, or #)
Add support for simplified configuration:
Type coercions can be provided by a convert function in the args array.
Post-MVP Stretch / Future Goal
Options
!
,@
, or#
)['!required', '!string', '--url', 'URL']
{ "string": ["URL", "--url"] }
The text was updated successfully, but these errors were encountered: