MCPcopy
hub / github.com/MithrilJS/mithril.js / getKeyMap

Function getKeyMap

render/render.js:524–534  ·  view source on GitHub ↗
(vnodes, start, end)

Source from the content-addressed store, hash-verified

522 }
523 }
524 function getKeyMap(vnodes, start, end) {
525 var map = {}
526 for (; start < end; start++) {
527 var vnode = vnodes[start]
528 if (vnode != null) {
529 var key = vnode.key
530 if (key != null) map[key] = start
531 }
532 }
533 return map
534 }
535 // Lifted from ivi https://github.com/ivijs/ivi/
536 // takes a list of unique numbers (-1 is special and can
537 // occur multiple times) and returns an array with the indices

Callers 1

updateNodesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected