<commit_before>'use strict';

var page = require('./page');
var worker = require('./worker');
var api;

if (typeof navigator !== 'undefined' && 'serviceWorker' in navigator) {
  api = page();
} else if (typeof self !== 'undefined' && 'clients' in self) {
  api = worker();
} else {
  api = {
    on: complain,
    once: complain,
    off: complain,
    emit: complain,
    broadcast: complain
  };
}

function complain () {<commit_msg>Improved feature check for API export ( resolves #8 bug in safari )<commit_after>'use strict';

var page = require('./page');
var worker = require('./worker');
var api;

if (typeof navigator !== 'undefined' && 'serviceWorker' in navigator && 'clients' in self === false) {
  api = page();
} else if (typeof self !== 'undefined' && 'clients' in self) {
  api = worker();
} else {
  api = {
    on: complain,
    once: complain,
    off: complain,
    emit: complain,
    broadcast: complain
  };
}

function complain () {
{'fraction_non_alphanumeric': 0.16753926701570682, 'fraction_numerical': 0.0010471204188481676, 'mean_word_length': 3.5308056872037916, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6973667', 'n_tokens_mistral': 295, 'n_tokens_neox': 295, 'n_words': 101}