console-app/AppTest.js

17 lines
503 B
JavaScript
Raw Normal View History

2020-05-09 19:51:43 +02:00
/* eslint-disable no-console */
'use strict';
// eslint-disable-next-line id-match
const { InteractiveOptions } = require ('./dist/lib/index.js');
(async () => {
const reader = new InteractiveOptions ([
2020-05-09 21:30:37 +02:00
{ 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' }
2020-05-09 19:51:43 +02:00
]);
await reader.parse ();
console.log (reader.serialize (true));
}) ();