docs: function flattenDeps(allDeps, factory) {
    const addToDeps = allDeps.concat([factory]);
    return Array.isArray(factory.deps) && factory.deps.length ?
      factory.deps.reduce((accu, dep) => flattenDeps(accu, dep), addToDeps) :
      addToDeps;
  }