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

Add atap function #1

Open
Constantiner opened this issue May 4, 2019 · 0 comments
Open

Add atap function #1

Constantiner opened this issue May 4, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Constantiner
Copy link
Owner

Add async version of tap function to handle side effects.

It is like identity function but has a function as argument.

const log = data => console.log(data);

const someData = "123";
const someDataPromise = Promise.resolve(someData);
atap(log)(someDataPromise).then(resultingData => expect(resultingData).toBeEqual(someData));

It prints 123 in console.

@Constantiner Constantiner added the enhancement New feature or request label May 4, 2019
@Constantiner Constantiner self-assigned this May 4, 2019
@Constantiner Constantiner added this to the 0.7.0 milestone May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant