Created
July 2, 2015 08:28
-
-
Save hwclass/c2e3149950ce5ceff864 to your computer and use it in GitHub Desktop.
Singleton Pattern (Config.js)
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
// models/Config.js | |
module.exports = (function () { | |
return function () { | |
var config = { | |
urls : { | |
tabs : { | |
address : '/#address', | |
payment : '/#payment' | |
} | |
}, | |
messages : { | |
errors : { | |
no_address_selected : 'Please, select an address to go next', | |
no_cards_used : 'You need to choose a credit card to pay', | |
default : 'An error occured. Please try again later' | |
} | |
} | |
} | |
var getConfig = function () { | |
return config; | |
} | |
return { | |
getConfig : getConfig | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment