b5fee463811d499327cefa73fcf5a68fb648f8d1
[platform/framework/web/crosswalk-tizen.git] /
1 'use strict';
2
3 exports.__generic = function (t, a) {
4         var count = 0, o = {}, self = Object(this);
5         a(t.call(self, function (value, i, scope) {
6                 a(value, this[i], "Value");
7                 a(i, count++, "Index");
8                 a(scope, this, "Scope");
9         }, self), -1, "Falsy result");
10         a(count, 3);
11
12         count = -1;
13         a(t.call(this, function () {
14                 return ++count ? o : null;
15         }, this), 1, "Truthy result");
16         a(count, 1);
17 };