Created
February 12, 2018 22:27
-
-
Save prof3ssorSt3v3/558f0f03706192f78200272276c5263f to your computer and use it in GitHub Desktop.
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
//The Local API file code | |
var api = (function(){ | |
var prop1 = 'prop1'; | |
var prop2 = 2; | |
var prop3 = true; | |
var prop4 = Date.now(); | |
var prop5 = ['yes', 'no', 'maybe']; | |
var init: function(){ | |
}; | |
var aa: function(){ | |
console.log('aa'); | |
ba(); | |
} | |
var ba: function(){ | |
console.log('ba'); | |
} | |
var ca: function(){ | |
console.log('ca'); | |
da(); | |
} | |
var da: function(){ | |
console.log('da') | |
} | |
var ea: function(){ | |
console.log('ea'); | |
fa(); | |
} | |
var fa: function(){ | |
console.log('fa'); | |
} | |
var ga: function(){ | |
console.log('ga'); | |
} | |
var ha: function(){ | |
console.log('ha'); | |
} | |
var ia: function(){ | |
console.log('ia'); | |
} | |
var ja: function(){ | |
console.log('ja'); | |
} | |
var ka: function(){ | |
console.log('ka'); | |
} | |
return ({ | |
prop1: prop1, | |
prop2: prop2, | |
prop4: prop4, | |
aa: aa, | |
ca: ca, | |
ja: ja, | |
ka: ka | |
}); | |
})(); | |
//my own script in some other JS file | |
api.aa(); | |
api.ca(); | |
api.ja(); | |
api.ka(); | |
api.prop1; | |
api.prop2; | |
api.prop4; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment