summaryrefslogtreecommitdiff
path: root/build-es/doDuring.js
blob: c13e62b8b9379abb31cae974e92efea74d7124f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
'use strict';

import during from './during';

export default function doDuring(iterator, test, cb) {
    var calls = 0;

    during(function(next) {
        if (calls++ < 1) return next(null, true);
        test.apply(this, arguments);
    }, iterator, cb);
}