Skip to content

Instantly share code, notes, and snippets.

@kru
Last active February 26, 2018 09:31
Show Gist options
  • Save kru/8a5c6799807449fa77b611699db9f7cb to your computer and use it in GitHub Desktop.
Save kru/8a5c6799807449fa77b611699db9f7cb to your computer and use it in GitHub Desktop.
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