A function calls its callback both synchronously and asynchronously depending on input. Why is this considered a bad pattern?
function get(key, cb) {
if (cache[key]) return cb(null, cache[key]); // sync
fetchRemote(key, cb); // async
}