forked from sindresorhus/ky
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow explicitly unsetting hooks on
.extend()
(sindresorhus#599)
* feat: allow explicitly unsetting hooks on `.extend()` The implementation here is pretty simple: just give hook merging some custom logic so it either merges OR resets to an empty array. Matches what was discussed in the related ticket. Documentation has been updated to describe this behavior as well. The dedicated test is just a modified copy of the existing `ky.extend()` one. Admittedly, I did modify a couple of other tests to cover the edge cases instead of building brand new tests. No reason other than noticing they were already close to what I needed and I'm being lazy. Closes sindresorhus#408 * chore: remove unused import
- Loading branch information
1 parent
b46c6eb
commit e552907
Showing
4 changed files
with
93 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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