<commit_before>/**
 * This instantiates the ReactiveBeaconRegion instance, a reactive data source for beacon information for the currently
 * monitored / ranged beacon region.
 *
 * @param beaconRegion an object describing the beacon region to monitor/range, with properties identifier, uuid, major, and minor
 * @param disableMonitoring true if monitoring is to be disabled; optional defaults to false
 * @param disableRanging true if ranging is to be disabled; optional defaults to false
 * @constructor
 */
ReactiveBeaconRegion = function(beaconRegion, disableMonitoring, disableRanging) {

    // check the provided beaconRegion
    check(beaconRegion, {
        identifier: String,
        uuid: String,
        // Optional, but if present must be number.
        major: Match.Optional(Number),
        minor: Match.Optional(Number)
    });

    check(disableMonitoring, Match.Optional(Boolean));
    check(disableRanging, Match.Optional(Boolean));

    // create a new Dependency
    this.dep = new Tracker.Dependency();

    // default disabling of monitoring and ranging to false
    if (disableMonitoring == null) {
        disableMonitoring = false;
    }

    if (disableRanging == null) {
        disableRanging = false;
    }

    // create this object's reactive beaconRegion and collection of beacons being monitored/ranged
    this.beaconRegion = beaconRegion;
    this.beaconRegion.beacons = [];
    this.beaconRegion.inRegion = null;

    // turn off logging
    cordova.plugins.locationManager.disableDebugLogs();

    // setup beacon monitoring and ranging<commit_msg>Updated check for major / minor optional arguments<commit_after>/**
 * This instantiates the ReactiveBeaconRegion instance, a reactive data source for beacon information for the currently
 * monitored / ranged beacon region.
 *
 * @param beaconRegion an object describing the beacon region to monitor/range, with properties identifier, uuid, major, and minor
 * @param disableMonitoring true if monitoring is to be disabled; optional defaults to false
 * @param disableRanging true if ranging is to be disabled; optional defaults to false
 * @constructor
 */
ReactiveBeaconRegion = function(beaconRegion, disableMonitoring, disableRanging) {

    // check the provided beaconRegion
    check(beaconRegion, {
        identifier: String,
        uuid: String,
        // Optional, but if present must be number.
        // Checks for no major/minor property, or value is undefined, null, or Number
        major: Match.Optional(Match.OneOf(undefined, null, Number)),
        minor: Match.Optional(Match.OneOf(undefined, null, Number))
    });

    check(disableMonitoring, Match.Optional(Boolean));
    check(disableRanging, Match.Optional(Boolean));

    // create a new Dependency
    this.dep = new Tracker.Dependency();

    // default disabling of monitoring and ranging to false
    if (disableMonitoring == null) {
        disableMonitoring = false;
    }

    if (disableRanging == null) {
        disableRanging = false;
    }

    // create this object's reactive beaconRegion and collection of beacons being monitored/ranged
    this.beaconRegion = beaconRegion;
    this.beaconRegion.beacons = [];
    this.beaconRegion.inRegion = null;

    // turn off logging
    cordova.plugins.locationManager.disableDebugLogs();

    // setup beacon monitoring and ranging
{'fraction_non_alphanumeric': 0.08067877344447752, 'fraction_numerical': 0.0, 'mean_word_length': 3.462151394422311, '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': '7357390', 'n_tokens_mistral': 880, 'n_tokens_neox': 826, 'n_words': 305}