All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.initializers.reactDevTools.js Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
import _typeof from "@babel/runtime/helpers/typeof";
var isObjectOrFunction = function isObjectOrFunction(object) {
  var type = _typeof(object);
  return type === "function" || type === "object" && !!object;
};
export default function disableReactDevTools() {
  if (window && window.document) {
    var developerToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
    if (!isObjectOrFunction(developerToolsHook)) return;
    for (var prop in developerToolsHook) {
      if (prop === "renderers") {
        developerToolsHook[prop] = new Map();
      } else {
        developerToolsHook[prop] = typeof developerToolsHook[prop] === "function" ? Function.prototype : null;
      }
    }
  }
}
//# sourceMappingURL=reactDevTools.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy