MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / addNameForId

Function addNameForId

code/styling/public/app.js:20148–20154  ·  view source on GitHub ↗
(names, id, name)

Source from the content-addressed store, hash-verified

20146
20147/* adds a new ID:name pairing to a names dictionary */
20148var 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 */
20157var resetIdNames = function resetIdNames(names, id) {

Callers 1

insertRulesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected