|
25 | 25 | > f( 1, 2 ) |
26 | 26 | 3 |
27 | 27 |
|
| 28 | + |
| 29 | +{{alias}}.prototype.apply( thisArg, args ) |
| 30 | + Calls a function with a given `this` value and arguments provided as an |
| 31 | + array (or array-like object). |
| 32 | + |
| 33 | + Parameters |
| 34 | + ---------- |
| 35 | + thisArg: any |
| 36 | + Value to use as `this` when executing the function. |
| 37 | + |
| 38 | + args: Array |
| 39 | + Array of arguments to pass to the function. |
| 40 | + |
| 41 | + Returns |
| 42 | + ------- |
| 43 | + out: any |
| 44 | + Function return value. |
| 45 | + |
| 46 | + Examples |
| 47 | + -------- |
| 48 | + > var f = new {{alias}}( 'x', 'y', 'return x + y' ); |
| 49 | + > f.apply( null, [ 1, 2 ] ) |
| 50 | + 3 |
| 51 | + |
| 52 | +{{alias}}.prototype.call( thisArg, ...args ) |
| 53 | + Calls a function with a given `this` value and arguments provided |
| 54 | + individually. |
| 55 | + |
| 56 | + Parameters |
| 57 | + ---------- |
| 58 | + thisArg: any |
| 59 | + Value to use as `this` when executing the function. |
| 60 | + |
| 61 | + args: ...any |
| 62 | + Arguments to pass to the function. |
| 63 | + |
| 64 | + Returns |
| 65 | + ------- |
| 66 | + out: any |
| 67 | + Function return value. |
| 68 | + |
| 69 | + Examples |
| 70 | + -------- |
| 71 | + > var f = new {{alias}}( 'x', 'y', 'return x + y' ); |
| 72 | + > f.call( null, 1, 2 ) |
| 73 | + 3 |
| 74 | + |
| 75 | +{{alias}}.prototype.bind( thisArg, ...args ) |
| 76 | + Creates a new function which, when called, has its `this` keyword set to the |
| 77 | + provided value, with a given sequence of arguments preceding any provided |
| 78 | + when the new function is called. |
| 79 | + |
| 80 | + Parameters |
| 81 | + ---------- |
| 82 | + thisArg: any |
| 83 | + Value to use as `this` when executing the function. |
| 84 | + |
| 85 | + args: ...any |
| 86 | + Arguments to pass to the function. |
| 87 | + |
| 88 | + Returns |
| 89 | + ------- |
| 90 | + fcn: Function |
| 91 | + Bound function. |
| 92 | + |
| 93 | + Examples |
| 94 | + -------- |
| 95 | + > var f = new {{alias}}( 'x', 'y', 'return x + y' ); |
| 96 | + > var g = f.bind( null, 1 ); |
| 97 | + > g( 2 ) |
| 98 | + 3 |
| 99 | + |
| 100 | +{{alias}}.prototype.toString() |
| 101 | + Returns a string representation of the function. |
| 102 | + |
| 103 | + Examples |
| 104 | + -------- |
| 105 | + > var f = new {{alias}}( 'x', 'y', 'return x + y' ); |
| 106 | + > f.toString() |
| 107 | + 'function anonymous( x, y ) { return x + y; }' |
| 108 | + |
| 109 | +{{alias}}.prototype.length |
| 110 | + The number of arguments expected by the function. |
| 111 | + |
| 112 | + Examples |
| 113 | + -------- |
| 114 | + > var f = new {{alias}}( 'x', 'y', 'return x + y' ); |
| 115 | + > f.length |
| 116 | + 2 |
| 117 | + |
| 118 | +{{alias}}.prototype.name |
| 119 | + The name of the function. |
| 120 | + |
| 121 | + Examples |
| 122 | + -------- |
| 123 | + > var f = new {{alias}}( 'x', 'y', 'return x + y' ); |
| 124 | + > f.name |
| 125 | + 'anonymous' |
| 126 | + |
| 127 | + > var f = new {{alias}}( 'x', 'y', 'return x + y' ); |
| 128 | + > f.name = 'add'; |
| 129 | + > f.name |
| 130 | + 'add' |
| 131 | + |
| 132 | +{{alias}}.prototype.prototype |
| 133 | + The prototype of the function. |
| 134 | + |
| 135 | + Examples |
| 136 | + -------- |
| 137 | + > var f = new {{alias}}( 'x', 'y', 'return x + y' ); |
| 138 | + > f.prototype |
| 139 | + {} |
| 140 | + |
28 | 141 | See Also |
29 | 142 | -------- |
30 | 143 |
|
0 commit comments