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 .isFromCache property to the stream API and rename the Promise API property from .fromCache to .isFromCache #768

Merged
merged 5 commits into from Apr 10, 2019

Conversation

szmarczak
Copy link
Collaborator

@szmarczak szmarczak commented Apr 2, 2019

Fixes #747

TODO: docs

@sindresorhus sindresorhus changed the title Add Stream fromCache property Add .fromCache property to the stream API Apr 6, 2019
@sindresorhus
Copy link
Owner

I would name it .isFromCache.

Is there any point in making it undefined before the request event? Can't we just make it false then?

@szmarczak
Copy link
Collaborator Author

I would name it .isFromCache.

Sure. Should it be changed for Promises too?

Is there any point in making it undefined before the request event? Can't we just make it false then?

It's undefined because we don't know is it true or false. I don't wanna make users mistaken.

@sindresorhus
Copy link
Owner

Yes, let’s change the Promise one too (forgot we had it there).

@szmarczak szmarczak changed the title Add .fromCache property to the stream API Add .isFromCache property to the stream API Apr 9, 2019
@sindresorhus sindresorhus changed the title Add .isFromCache property to the stream API Add .isFromCache property to the stream API and rename the Promise API property from .fromCache to .isFromCache Apr 10, 2019
@sindresorhus sindresorhus merged commit b5e443b into sindresorhus:master Apr 10, 2019
@sindresorhus
Copy link
Owner

👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants