MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / changePrototype

Function changePrototype

out/cli.cjs:65980–65986  ·  view source on GitHub ↗
(to, from)

Source from the content-addressed store, hash-verified

65978 if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
65979 return;
65980 }
65981 Object.defineProperty(to, property, fromDescriptor);
65982};
65983var canCopyProperty = function(toDescriptor, fromDescriptor) {
65984 return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
65985};
65986var changePrototype = (to, from) => {
65987 const fromPrototype = Object.getPrototypeOf(from);
65988 if (fromPrototype === Object.getPrototypeOf(to)) {
65989 return;

Callers 1

mimicFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected