(node, prop)
| 26 | }; |
| 27 | |
| 28 | const getPropertyFromData = function(node, prop) { |
| 29 | const props = node.store.props; |
| 30 | const data = node.data || {}; |
| 31 | const config = props[prop]; |
| 32 | |
| 33 | if (typeof config === 'function') { |
| 34 | return config(data, node); |
| 35 | } else if (typeof config === 'string') { |
| 36 | return data[config]; |
| 37 | } else if (typeof config === 'undefined') { |
| 38 | return ''; |
| 39 | } |
| 40 | }; |
| 41 | |
| 42 | let nodeIdSeed = 0; |
| 43 |
no outgoing calls
no test coverage detected