A advanced version of Inject Lo-dash FP or Ramda to browser, see more there.
- Allows u inject many libs concurently.
- Also handle all the callbacks using "promise".
- Check whether your browser supports ES6 features or not first.
- I hornestly don't know if I implement "Promise" correctly or not. It turns out that I am still handling all the timeout / detection myself. Despite the functional programming tactics are very helpful, I reckon my implementation is still verbose and ugly. Especially the recursion of
defer()
function! That is my limitation. I am kean to see if there is a better solution:smile:! - Because this script will almost always runs on 3rd-party pages, we cannot rely on any fancy polyfill dependency. (Like bluebird.js)