Created
October 13, 2014 10:36
-
-
Save xcarpentier/65abca9a772560652b6c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* A éviter */ | |
function dataService () { | |
var someValue = ''; | |
function save () { | |
/* */ | |
}; | |
function validate () { | |
/* */ | |
}; | |
return { | |
save: save, | |
someValue: someValue, | |
validate: validate | |
}; | |
} | |
/* Recommander */ | |
function dataService () { | |
var someValue = ''; | |
var service = { | |
save: save, | |
someValue: someValue, | |
validate: validate | |
}; | |
return service; | |
//////////// | |
function save () { | |
/* */ | |
}; | |
function validate () { | |
/* */ | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment