]> git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/shim.js
ad2e645067db5dbc94f43a6b9f0651b8ed405030
[rbdr/dotfiles] / atom / packages / vim-mode / node_modules / grim / node_modules / emissary / node_modules / es6-weak-map / node_modules / es5-ext / test / array / # / find / shim.js
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), undefined, "Falsy result");
10 a(count, 3);
11
12 count = -1;
13 a(t.call(this, function () {
14 return ++count ? o : null;
15 }, this), this[1], "Truthy result");
16 a(count, 1);
17 };