Make ImmutableJS objects more readable when viewed in Chrome DevTools
Transforms Immutable JS objects to a more readable format when they are logged to the console.
Based on immutable-devtools.
The Chrome extension will only work if you enable Custom Formatters in the DevTools settings.
The code in "/immutable-devtools" is essentially just a copy of immutable-devtools
.
The two main differences are:
instanceof Immutable.Record
to detect if an object is a record, since we don't have access to the Immutable module that's loaded on the page. (We only have access to the one loaded in the extension.)window.__ImmutableJSDevToolsFormattersInstalled
property.Then all that's left to do is to load the code in "devtools.js".
npm install
npm run dev
Make sure to reload the extension after any changes.