Skip to content

Instantly share code, notes, and snippets.

@midnightcodr
midnightcodr / main.js
Created April 11, 2017 02:20
inquirer with async/await
const inquirer = require('inquirer')
const genList = (list) => {
const choices = list.map((item, index) => {
return {
key: index,
name: `${item.id}: ${item.quantity}@${item.price}`,
value: item.id
}
})