mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
work on say and gather
This commit is contained in:
17
lib/task-list.js
Normal file
17
lib/task-list.js
Normal file
@@ -0,0 +1,17 @@
|
||||
class TaskList {
|
||||
constructor(tasks, callSid) {
|
||||
this.tasks = tasks;
|
||||
this.callSid = callSid;
|
||||
}
|
||||
|
||||
shift() {
|
||||
const task = this.tasks.shift();
|
||||
if (task) return {task, callSid: this.callSid};
|
||||
}
|
||||
|
||||
get length() {
|
||||
return this.tasks.length;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TaskList;
|
||||
Reference in New Issue
Block a user