Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Service = (function() {
- function doStuff(command, package) {
- var response = ""
- switch(command) {
- case "A":
- response = a(package);
- break;
- case "B":
- response = b(package);
- break;
- case "C":
- response = c(package);
- break;
- default:
- // should never get here
- response = "NOPE!";
- }
- return response;
- }
- function a(package) {
- // do stuff
- }
- function b(package) {
- // do stuff
- }
- function c(package) {
- // do stuff;
- }
- return {
- doStuff: doStuff,
- a: a,
- b: b,
- c: c
- }
- });
- module.exports = Service;
Add Comment
Please, Sign In to add comment