penguins-eggs
Version:
A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others
25 lines (24 loc) • 701 B
JavaScript
/**
* ./src/lib/
* penguins-eggs v.10.0.0 / ecmascript 2020
* author: Piero Proietti
* email: piero.proietti@gmail.com
* license: MIT
*/
import inquirer from 'inquirer';
export default async function selectRegions(selected = '') {
const questions = [
{
choices: ['Atlantic', 'Africa', 'America', 'Antarctica', 'Artic', 'Australia', 'Europe', 'India', 'Europe', 'Pacific'],
default: selected,
message: 'Select your region: ',
name: 'region',
type: 'list'
}
];
return new Promise((resolve) => {
inquirer.prompt(questions).then((options) => {
resolve(options.region);
});
});
}