taskninja 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +6 -3
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -161,15 +161,18 @@ program
|
|
|
161
161
|
console.log('No tasks found.');
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
// map all tasks to displayable objects
|
|
165
|
+
const tableData = tasks.map(task => ({
|
|
166
166
|
ID: task.id,
|
|
167
167
|
Title: task.title,
|
|
168
168
|
Status: task.status,
|
|
169
169
|
Priority: task.priority,
|
|
170
170
|
DueDate: task.dueDate,
|
|
171
171
|
Description: task.description || ''
|
|
172
|
-
}
|
|
172
|
+
}));
|
|
173
|
+
|
|
174
|
+
// display all tasks in table format
|
|
175
|
+
console.table(tableData);
|
|
173
176
|
});
|
|
174
177
|
|
|
175
178
|
// use command 'update' with task ID and action
|