| 29 | } |
| 30 | |
| 31 | function _parseObject (resultSet, object) { |
| 32 | if (object.toString !== Object.prototype.toString && !object.toString.toString().includes('[native code]')) { |
| 33 | resultSet[object.toString()] = true; |
| 34 | return; |
| 35 | } |
| 36 | |
| 37 | for (var k in object) { |
| 38 | if (hasOwn.call(object, k)) { |
| 39 | // set value to false instead of deleting it to avoid changing object structure |
| 40 | // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions |
| 41 | resultSet[k] = !!object[k]; |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | var SPACE = /\s+/; |
| 47 | function _parseString (resultSet, str) { |