This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//DO | |
function example(options) { | |
//this clearly identifies what the expected parameters are | |
const { | |
injectedLibrary, | |
otherThing | |
} = options; | |
this.methodOne = function(){ | |
injectedLibrary.doSomething('methodOne') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(undefined){ | |
// (0, eval)('this') is a robust way of getting a reference to the global object | |
// For details, see http://stackoverflow.com/questions/14119988/return-this-0-evalthis/14120023#14120023 | |
var window = this || (0, eval)('this'), | |
document = window['document'], | |
navigator = window['navigator'], | |
jQueryInstance = window["jQuery"], | |
JSON = window["JSON"]; | |
(function(factory) { |
OlderNewer