Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

120
Vistas
Deep merging JavaScript objects into a composite object whose properties are dynamically linked to those of the merged objects

How would you write a JavaScript function which:

  1. Takes in a list of objects to be (deeply) merged and outputs a “composite object” whose key/values are the result of deeply merging these objects.

  2. Constructs this “composite object” such that: if the key/values of the original objects are changed after the composite object is created, and the composite object is queried for a key/value which depends on one of the changed values, the composite object will return a result which reflects that change (ie. the value is dynamically generated based on the current states of the original objects, and possibly memoized too)

There are a few libraries such as Lodash, deepmerge, object-accumulator, lazy-recursive-merge, Lazy.js which will do #1 above, but I know of nothing which can do #2.

How do you write a function that does both #1 and #2? Can one of the above libraries be used as a starting point for this?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda