(names, id, name)
| 20146 | |
| 20147 | /* adds a new ID:name pairing to a names dictionary */ |
| 20148 | var addNameForId = function addNameForId(names, id, name) { |
| 20149 | if (name) { |
| 20150 | // eslint-disable-next-line no-param-reassign |
| 20151 | var namesForId = names[id] || (names[id] = Object.create(null)); |
| 20152 | namesForId[name] = true; |
| 20153 | } |
| 20154 | }; |
| 20155 | |
| 20156 | /* resets an ID entirely by overwriting it in the dictionary */ |
| 20157 | var resetIdNames = function resetIdNames(names, id) { |