Created
January 29, 2016 14:34
-
-
Save MeyCry/5a81655eabd0d590e745 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
_appsHash = {} | |
_appsArr = [] | |
getAll = -> _appsArr | |
getAppById = (appId) -> _appsHash[appId] | |
_fetch = (apps) -> | |
appsHash = {} | |
_appsArr = apps.map (item) -> | |
appsHash[item.id] = _appsHash[item.id] or assign({}, item) | |
_appsHash = appsHash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment