Comments (3)
This library can't merge non-basic objects out of the box.
See https://github.com/TehShrike/deepmerge#ismergeableobject
from deepmerge.
I found this in the source code:
function getKeys(target) {
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
}
and something will be wrong with Object.keys
Object.keys(controller.signal) // []
but for...in works fine
for (const key in controller.signal) {
console.log(key);
}
/*
aborted
reason
onabort
throwIfAborted
addEventListener
dispatchEvent
removeEventListener
*/
May be should change to use for...in?
from deepmerge.
There are a few reason why for..in
is a bad approach so I don't see that changing.
If you want a more modern version of this library, check out https://github.com/RebeccaStevens/deepmerge-ts
from deepmerge.
Related Issues (20)
- Deepmerge deletes values of ArrayBuffer and replaces to an empty object HOT 4
- How to use one object as target HOT 8
- Deno? HOT 7
- High CPU usage with large object merge HOT 1
- use recursive partial for type definitions HOT 1
- Will we ever see the v5? HOT 4
- When a particular property of the source object is undefined while the target one has a value, the value will be override by undefined HOT 2
- How to delete an element from an array with deepmerge. HOT 1
- How to avoid array concatenation HOT 18
- `is-mergeable-object` is a `devDependency` but used in `index.js` HOT 7
- add ESM, support for module and browser HOT 5
- Possible to remove duplicate objects in arrays? HOT 1
- deepmerge_1.default) is not a function (No Webpack) HOT 4
- A class instance in an array in an object get formed into an object.
- It need filter on merge
- Add a way to merge into existing target object, just like Object.assign
- Feature Request: Passing a collision callback for colliding props
- [Feature request] Pass parent values to `customMerge()`
- When merging arrays the target defaults to empty array
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepmerge.