MCPcopy
hub / github.com/basecamp/trix / unconstruct

Function unconstruct

action_text-trix/app/assets/javascripts/trix.js:1855–1862  ·  view source on GitHub ↗

* Creates a new function that constructs an instance of the given constructor function with the provided arguments. * * @param func - The constructor function to be wrapped and called. * @returns A new function that constructs an instance of the given constructor function with the provided

(Func)

Source from the content-addressed store, hash-verified

1853 * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
1854 */
1855 function unconstruct(Func) {
1856 return function () {
1857 for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
1858 args[_key4] = arguments[_key4];
1859 }
1860 return construct(Func, args);
1861 };
1862 }
1863 /**
1864 * Add properties to a lookup table
1865 *

Callers 1

trix.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…