node-summary
node-summary copied to clipboard
Work in the browser
Apart from the require
function being called to load lodash, there is no real reason that prevents node-summary from running in the browser.
This can be implemented in the same way I've started writing Affair. It'll need a slight rewrite of the library, hopefully without breaking backwards compatibility.
This has now been started and seems to work without errors, although the summarised text is different?
It currently depends on Underscore/Lo-dash however I think I could remove these dependencies by including them within the Toolkit
object.
I forgot to add that the test suite does pass, and it does work in the browser. Once the dependencies have been removed and the code has been improved I should be ok to merge this.
Would I be able to use this as is? @jbrooksuk
I don't understand why you have to have a browser / non-browser version. Just remove summarizeFromUrl and then transpile it into es5 compatible code before packaging and that should do it.