(str)
| 1 | // measures how much memory object keys take vs values in collection of objects |
| 2 | (function keysVsValuesInit(root) { |
| 3 | function stringSize(str) { |
| 4 | // JavaScript strings are unicode UTF-16 up to 2 bytes per character |
| 5 | return str.length * 2; |
| 6 | } |
| 7 | |
| 8 | function objectSize(obj) { |
| 9 | if (typeof obj === 'string') { |
no outgoing calls
no test coverage detected