function checkMask(value, bitmask) {
  return (value & bitmask) === bitmask;
}
Injects plugins to be used by `EventPluginHub`. The plugin names must be
in the ordering injected by `injectEventPluginOrder`.

Plugins can be injected as part of page initialization or on-the-fly.

@param {object} injectedNamesToPlugins Map from names to plugin modules.
@internal
@see {EventPluginHub.injection.injectEventPluginsByName}