Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter.sync #157

Closed
richytong opened this issue Oct 1, 2020 · 1 comment
Closed

filter.sync #157

richytong opened this issue Oct 1, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@richytong
Copy link
Collaborator

var T any,
  array Array<T>,
  predicate T=>boolean,

filter.sync(predicate)(array) -> Array<T>

Synchronous filter without promise handling.

const isOdd = number => number % 2 == 1

console.log(
  filter.sync(isOdd)([1, 2, 3, 4, 5]),
) // [1, 3, 5]
@richytong richytong added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 1, 2020
@richytong
Copy link
Collaborator Author

I would rather not go down the route of .sync methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant