Skip to content

Instantly share code, notes, and snippets.

@sachioross
sachioross / refactor-example.js
Created September 20, 2018 07:04
Quick refactoring example showing usage of method overrides and dynamic injection.
/**
* Examples of function and object overriding
* in addition to dynamic dependency injection.
*
* If you want proof this works, just take this gist,
* put it into a file (e.g. "test.js") and then run
* `node test.js' followed by `node test.js new`
*/
/*