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 .reset() method #87

Merged
merged 10 commits into from
Sep 29, 2019
Merged

Add .reset() method #87

merged 10 commits into from
Sep 29, 2019

Conversation

husek
Copy link
Contributor

@husek husek commented Sep 9, 2019

@husek husek changed the title Added Reset method, Documented it with tests Add Reset method Sep 10, 2019
@sindresorhus
Copy link
Owner

It should also support resetting to the default value if the user defined the defaults option (which should also be documented).

@sindresorhus sindresorhus changed the title Add Reset method Add .reset() method Sep 21, 2019
@sindresorhus
Copy link
Owner

I think it would be useful if it could reset multiple keys too.

index.d.ts Outdated Show resolved Hide resolved
index.test-d.ts Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
@husek
Copy link
Contributor Author

husek commented Sep 23, 2019

It should also support resetting to the default value if the user defined the defaults option (which should also be documented).

Just added support to defaults

I think it would be useful if it could reset multiple keys too.

.reset() accepts any number of parameters now and it will reset them all

@husek husek requested a review from sindresorhus September 23, 2019 15:41
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
@husek husek requested a review from sindresorhus September 23, 2019 17:06
@sindresorhus sindresorhus merged commit 52ca0dd into sindresorhus:master Sep 29, 2019
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.

2 participants