(filesJson, onComplete)
| 774 | * @param {Function} [onComplete] - Optional callback when all files are loaded |
| 775 | */ |
| 776 | const fetchAllFiles = async (filesJson, onComplete) => { |
| 777 | const promises = filesJson.map(async (file) => { |
| 778 | await processFile(file); |
| 779 | }); |
| 780 | await Promise.all(promises); |
| 781 | if (onComplete) { |
| 782 | onComplete(); |
| 783 | } |
| 784 | }; |
| 785 | |
| 786 | // NOTE: Callback functions are now automatically registered by importing fastled_callbacks.js |
| 787 | // No need to manually bind them here - they're pure JavaScript functions |
no test coverage detected