* Gets only the scripts that should be open (have an order property) * @param {string} appId - The application ID * @returns {Promise } Array of scripts that should be open, sorted by order
(appId)
| 87 | * @returns {Promise<Array>} Array of scripts that should be open, sorted by order |
| 88 | */ |
| 89 | async getOpenScripts(appId) { |
| 90 | const allScripts = await this.getScripts(appId); |
| 91 | return allScripts |
| 92 | .filter(script => script.order !== undefined && script.order !== null) |
| 93 | .sort((a, b) => a.order - b.order); |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Gets all saved scripts (including closed ones) |