@@ -2156,7 +2156,7 @@ interface Namespace {
21562156 * var obj = {'a':{'b':{'c':'d'}}};
21572157 *
21582158 * var out = flatten( obj );
2159- * // returns {'a|b':{' c':'d'} }
2159+ * // returns {'a|b| c':'d'}
21602160 */
21612161 flattenObject : typeof flattenObject ;
21622162
@@ -3256,23 +3256,30 @@ interface Namespace {
32563256 * @returns function wrapper
32573257 *
32583258 * @example
3259- * function foo( a, b, c ) {
3260- * return [ a, b, c ];
3261- * }
3262- *
32633259 * function clbk( v ) {
3264- * this.count += 1;
32653260 * return v * 2;
32663261 * }
32673262 *
3268- * var thisArg = { 'count': 0 };
3269- * var bar = ns.mapArguments( foo, clbk, thisArg );
3263+ * function Foo() {
3264+ * this.x = 1;
3265+ * this.y = 2;
3266+ * }
32703267 *
3271- * var out = bar( 1, 2, 3 );
3272- * // returns [ 2, 4, 6 ]
3268+ * Foo.prototype.scale = function scale( a, b ) {
3269+ * return [ this.x*a, this.y*b ];
3270+ * };
32733271 *
3274- * var count = thisArg.count;
3275- * // returns 3
3272+ * var ctx = {
3273+ * 'x': 10,
3274+ * 'y': 20
3275+ * };
3276+ *
3277+ * var foo = new Foo();
3278+ *
3279+ * var bar = ns.mapArguments( foo.scale, clbk, ctx );
3280+ *
3281+ * var out = bar( 1, 2 );
3282+ * // returns [ 20, 80 ]
32763283 */
32773284 mapArguments : typeof mapArguments ;
32783285
0 commit comments