Skip to content

Instantly share code, notes, and snippets.

@philcon93
Last active February 25, 2019 08:49
Show Gist options
  • Save philcon93/2ebefe7c87e1cca6cb0014e0399e6aa0 to your computer and use it in GitHub Desktop.
Save philcon93/2ebefe7c87e1cca6cb0014e0399e6aa0 to your computer and use it in GitHub Desktop.
Revealing Module Pattern with import/export
export addressBook = (function(){
var phil = 'phil';
return{
billingAddress: 'QLD'
};
})()
export addToCart = (function(){
var phil = 'phil';
return{
cartId: '123'
};
})()
import addressBook from './addressbook.js'
import addToCart from './addtocart.js'
var neto = (function(){
aaa = 2+2;
return{
addressbook: addressBook,
addtocart : addToCart
bbb : 1+1
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment