{"size": 261, "ext": "js", "max_stars_repo_path": "takeWhile.js", "max_stars_repo_name": "judilsteve/linqjs", "max_stars_repo_stars_event_min_datetime": "2021-03-09T08:02:13.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-11T18:07:33.000Z", "max_issues_repo_path": "takeWhile.js", "max_issues_repo_name": "judilsteve/linqjs", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "takeWhile.js", "max_forks_repo_name": "judilsteve/linqjs", "max_forks_repo_forks_event_min_datetime": "2021-03-09T12:53:40.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-16T11:13:41.000Z"}
{"max_stars_count": 15, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 26.1, "max_line_length": 58, "alphanum_fraction": 0.6973180077}
import { registerIterableExtension } from './registry.js';

function* takeWhile(iterable, predicate) {
    for(const element of iterable) {
        if(!predicate(element)) break;
        yield element;
    }
}
registerIterableExtension("takeWhile", takeWhile);
