How to import lodash to Chrome console?

Matt Leo
1 min readDec 28, 2017

--

I am currently learning React-native and found lodash library very useful. Sometimes, I just like to test out the functions of lodash within Chrome development console. And here’s to how to load the library to console.

fetch('https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js')
.then(response => response.text())
.then(text => eval(text))

Updates: I just found an easier way of trying out lodash in real-time. From the lodash API page, look for sample, where you can find the link “TRY in REPL” at the lower bottom.

--

--