Created
May 27, 2015 18:36
-
-
Save alxhub/31fbd863eea3f67b4fcd 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
userSearchTactic(req:UserSeachRequest, ctx: Context): Rx.Observable<UserSearch> { | |
return ctx | |
.localDataStore | |
.objectsByType(User) // Rx.Observable<User> | |
.filter((user: User) => user.matches(req)) | |
.reduce((user: User, results: UserSearch) => results.users.push(user), new UserSearch()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment