MCPcopy Index your code
hub / github.com/immerjs/immer / enumerableOnly

Function enumerableOnly

__tests__/base.js:4259–4267  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

4257}
4258
4259function enumerableOnly(x) {
4260 const copy = Array.isArray(x) ? x.slice() : Object.assign({}, x)
4261 each(copy, (prop, value) => {
4262 if (value && typeof value === "object") {
4263 copy[prop] = enumerableOnly(value)
4264 }
4265 })
4266 return copy
4267}
4268
4269function isEnumerable(base, prop) {
4270 const desc = Object.getOwnPropertyDescriptor(base, prop)

Callers 1

runBaseTestFunction · 0.85

Calls 1

eachFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…