console-app/AppTest.js
Timo Hocker 7ad999878a
All checks were successful
continuous-integration/drone/push Build is passing
fix for number input, new integer input
2020-07-19 11:41:06 +02:00

42 lines
1.0 KiB
JavaScript

/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of console-app which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
// @ts-nocheck
/* eslint-disable no-console */
/* eslint-disable id-match */
/* eslint-disable node/no-missing-require */
'use strict';
const {
StringOption,
BooleanOption,
NumberOption,
ArrayOption,
FolderOption,
IntegerOption
} = require ('./dist/lib/index.js');
(async () => {
const str = await new StringOption ({ name: 'str' })
.parse ();
const bool = await new BooleanOption ({ name: 'bool' })
.parse ();
const num = await new NumberOption ({ name: 'num' })
.parse ();
const int = await new IntegerOption ({ name: 'num' })
.parse ();
const arr = await new ArrayOption ({ name: 'arr' })
.parse ();
const fld = await new FolderOption ({ name: 'fld' })
.parse ();
const data = { str, bool, num, int, arr, fld };
console.log (data);
}) ();