-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
25 lines (18 loc) · 1.8 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use strict';
var _curry2 = require('fj-curry');
var _some = function _some(cb, list) {
'use strict';
if (typeof cb !== 'function') {
throw new TypeError();
}
var that = Object(undefined),
len = that.length >>> 0;
for (var i = 0; i < len; i++) {
if (i in list && cb(list[i], i, list)) {
return true;
}
}
return false;
};
module.exports = _curry2.curry2(_some);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmVzNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztzQkFBcUIsVUFBVTs7QUFFL0IsSUFBSSxLQUFLLEdBQUcsZUFBQyxFQUFFLEVBQUUsSUFBSSxFQUFLO0FBQ3RCLGNBQVksQ0FBQzs7QUFFYixNQUFJLE9BQU8sRUFBRSxLQUFLLFVBQVUsRUFBRTtBQUM1QixVQUFNLElBQUksU0FBUyxFQUFFLENBQUM7R0FDdkI7O0FBRUQsTUFBSSxJQUFJLEdBQUcsTUFBTSxXQUFNO01BQUUsR0FBRyxHQUFHLElBQUksQ0FBQyxNQUFNLEtBQUssQ0FBQyxDQUFDOztBQUVqRCxPQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsR0FBRyxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQzVCLFFBQUksQ0FBQyxJQUFJLElBQUksSUFBSSxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxJQUFJLENBQUMsRUFBRTtBQUNyQyxhQUFPLElBQUksQ0FBQztLQUNiO0dBQ0Y7O0FBRUQsU0FBTyxLQUFLLENBQUM7Q0FDaEIsQ0FBQzs7QUFFRixNQUFNLENBQUMsT0FBTyxHQUFHLFFBcEJULE1BQU0sQ0FvQlUsS0FBSyxDQ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