This question evaluates proficiency in JavaScript data manipulation and asynchronous programming, testing competencies in transforming nested objects into single-level key paths and reproducing Promise.all semantics.
Given a nested JavaScript object, write a function to flatten it so that nested keys are converted to a single-level path (e.g., {a:{b:1}} -> {'a.b':1}). Implement Promise.all from scratch in JavaScript; it should take an iterable of promises/values and return a single promise that resolves when all inputs resolve or rejects when any input rejects.