17 lines
503 B
JavaScript
17 lines
503 B
JavaScript
/* eslint-disable no-console */
|
|
'use strict';
|
|
|
|
// eslint-disable-next-line id-match
|
|
const { InteractiveOptions } = require ('./dist/lib/index.js');
|
|
|
|
(async () => {
|
|
const reader = new InteractiveOptions ([
|
|
{ name: 'str', type: 'string', env: 'TEST_STR' },
|
|
{ name: 'bool', type: 'boolean', env: 'TEST_BOOL' },
|
|
{ name: 'num', type: 'number', env: 'TEST_NUM' },
|
|
{ name: 'arr', type: 'array', env: 'TEST_ARR' }
|
|
]);
|
|
await reader.parse ();
|
|
console.log (reader.serialize (true));
|
|
}) ();
|