package.initializers.reactDevTools.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
{"version":3,"file":"reactDevTools.js","names":["isObjectOrFunction","object","type","_typeof","disableReactDevTools","window","document","developerToolsHook","__REACT_DEVTOOLS_GLOBAL_HOOK__","prop","Map","Function","prototype"],"sources":["../../src/initializers/reactDevTools.js"],"sourcesContent":["const isObjectOrFunction = object => {\n const type = typeof object;\n\n return type === \"function\" || (type === \"object\" && !!object);\n};\n\nexport default function disableReactDevTools() {\n if (window && window.document) {\n const developerToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (!isObjectOrFunction(developerToolsHook)) return;\n\n for (const prop in developerToolsHook) {\n if (prop === \"renderers\") {\n developerToolsHook[prop] = new Map();\n } else {\n developerToolsHook[prop] =\n typeof developerToolsHook[prop] === \"function\"\n ? Function.prototype\n : null;\n }\n }\n }\n}\n"],"mappings":";AAAA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAGC,MAAM,EAAI;EACnC,IAAMC,IAAI,GAAAC,OAAA,CAAUF,MAAM;EAE1B,OAAOC,IAAI,KAAK,UAAU,IAAKA,IAAI,KAAK,QAAQ,IAAI,CAAC,CAACD,MAAO;AAC/D,CAAC;AAED,eAAe,SAASG,oBAAoBA,CAAA,EAAG;EAC7C,IAAIC,MAAM,IAAIA,MAAM,CAACC,QAAQ,EAAE;IAC7B,IAAMC,kBAAkB,GAAGF,MAAM,CAACG,8BAA8B;IAEhE,IAAI,CAACR,kBAAkB,CAACO,kBAAkB,CAAC,EAAE;IAE7C,KAAK,IAAME,IAAI,IAAIF,kBAAkB,EAAE;MACrC,IAAIE,IAAI,KAAK,WAAW,EAAE;QACxBF,kBAAkB,CAACE,IAAI,CAAC,GAAG,IAAIC,GAAG,CAAC,CAAC;MACtC,CAAC,MAAM;QACLH,kBAAkB,CAACE,IAAI,CAAC,GACtB,OAAOF,kBAAkB,CAACE,IAAI,CAAC,KAAK,UAAU,GAC1CE,QAAQ,CAACC,SAAS,GAClB,IAAI;MACZ;IACF;EACF;AACF","ignoreList":[]}