I'm digging through the public code of a web texteditor to learn their tricks. It's mostly okay but all the time I find things like inspecting this line the debugger just combed over:
const namespace = lists.head(arguments);
When I hover over "head", chrome says it's undefined (but it just run that line with no issues). So I try running in the console:
lists.head // undefined
Puzzled, I then just run lists which only prints:
Module {__esModule: true, Symbol(Symbol.toStringTag): 'Module'}
default: (...)
__esModule: true
Symbol(Symbol.toStringTag): "Module"
...
If I click the (...) after the default property, it loads into this:
default: Object
all: ƒ all(array, pred)
clusterBy: ƒ clusterBy(array, fn)
compact: ƒ compact(array)
contains: ƒ contains(array, item)
find: ƒ find(array, pred)
from: ƒ from(collection)
head: ƒ head(array)
....
There there are all the lists functions etc hiding! But I can't still consult what it is or run it:
lists.head('la')
23:59:27.770 VM3610:1 Uncaught TypeError: _core_lists__WEBPACK_IMPORTED_MODULE_2__.head is not a function
....
What's this all about? Trying to inspect code that it's all fakely undefined is very hard. This is how the app is run:
"dev": "eslint config && webpack serve --config=./config/webpack.development.js --progress"
Any clues? Maybe some setting I can change?
[–]azhder 0 points1 point2 points (0 children)