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

Function changeToString

out/cli.cjs:65991–65996  ·  view source on GitHub ↗
(to, from, name)

Source from the content-addressed store, hash-verified

65989 return;
65990 }
65991 Object.setPrototypeOf(to, fromPrototype);
65992};
65993var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
65994${fromBody}`;
65995var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
65996var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
65997var changeToString = (to, from, name) => {
65998 const withName = name === "" ? "" : `with ${name.trim()}() `;
65999 const newToString = wrappedToString.bind(null, withName, from.toString());

Callers 1

mimicFunctionFunction · 0.85

Calls 2

trimMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected