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.
Files changed (2) hide show
  1. package/app.js +6 -3
  2. 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
- // display tasks in a table format
165
- console.table([{
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskninja",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "a simple CLI application with JS as a (To-Do Application)",
5
5
  "main": "app.js",
6
6
  "type" : "module",