generated from fastify/skeleton
-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
Export the private function isMergeableObject so that it can be easily extended when adding functionality?
There is also no documentation indicating the behavior that it's being overwritten and what the base configuration is meant to do.
so instead of defining:
const customDeepMergeOptions: Options = {
isMergeableObject: function newIsMergeableObject(value): boolean {
// Default Logic from the Base Options it's not inheritable.
return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date)
// Custom Overrides
&& !(value instanceof FormData);
}
}it can be defined like so getting any future changes to the functionality:
import deepmerge, { Options, isMergeableObject} from "deepmerge";
const customDeepMergeOptions: Options = {
isMergeableObject: function newIsMergeableObject(value): boolean {
// Default Logic .
return isMergeableObject(value)
// Custom Overrides
&& !(value instanceof FormData);
}
}Motivation
No response
Example
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels