Last active
February 26, 2018 09:31
-
-
Save kru/8a5c6799807449fa77b611699db9f7cb 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
var myAwesomeModule = function(members) { | |
function change() { | |
publicAPI.showMember = removeFalsy; | |
} | |
function getMembers() { | |
console.log(members); | |
} | |
function removeFalsy() { | |
var truthMember = members.filter(x => !!x); | |
console.log(truthMember); | |
} | |
var publicApi = { | |
showMember: getMembers, | |
change: change | |
}; | |
return publicAPI; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment