From 8cff702f9d0e910c8ed19ef30ed4ac203d3e7a6e Mon Sep 17 00:00:00 2001 From: Joris W Date: Mon, 23 Dec 2024 07:49:55 -0300 Subject: [PATCH 1/2] Clarify `all` parameter Signed-off-by: Joris W --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f17fa26..1036c8b 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ deepmerge(options) `options` is optional and can contain following values - `symbols` (`boolean`, optional) - should also merge object-keys which are symbols, default is false -- `all` (`boolean`, optional) - merges all parameters, default is false +- `all` (`boolean`, optional) - makes deepmerge return a function that accepts and merges any number of passed objects, default is false - `mergeArray` (`function`, optional) - provide a function, which returns a function to add custom array merging function - `cloneProtoObject` (`function`, optional) - provide a function, which must return a clone of the object with the prototype of the object @@ -137,7 +137,7 @@ The benchmarks are available in the benchmark-folder. `npm run bench` - benchmark various use cases of deepmerge: ``` -@@fastify/deepmerge: merge regex with date x 1,256,523,040 ops/sec ±0.16% (92 runs sampled) +@fastify/deepmerge: merge regex with date x 1,256,523,040 ops/sec ±0.16% (92 runs sampled) @fastify/deepmerge: merge object with a primitive x 1,256,082,915 ops/sec ±0.25% (97 runs sampled) @fastify/deepmerge: merge two arrays containing strings x 25,392,605 ops/sec ±0.22% (97 runs sampled) @fastify/deepmerge: two merge arrays containing objects x 1,655,426 ops/sec ±0.65% (96 runs sampled) From d66808de3e84ec891f9a67e302b489086ff3e903 Mon Sep 17 00:00:00 2001 From: Joris W Date: Mon, 23 Dec 2024 09:06:09 -0300 Subject: [PATCH 2/2] Update README.md Signed-off-by: Joris W --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1036c8b..1d67840 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ deepmerge(options) `options` is optional and can contain following values - `symbols` (`boolean`, optional) - should also merge object-keys which are symbols, default is false -- `all` (`boolean`, optional) - makes deepmerge return a function that accepts and merges any number of passed objects, default is false +- `all` (`boolean`, optional) - makes deepmerge accept and merge any number of passed objects, default is false - `mergeArray` (`function`, optional) - provide a function, which returns a function to add custom array merging function - `cloneProtoObject` (`function`, optional) - provide a function, which must return a clone of the object with the prototype of the object