<commit_before>// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

var Event = require('org.chromium.common.events');
var storage = require('org.chromium.storage.Storage');
var exec = require('cordova/exec');
var channel = require('cordova/channel');
var runtime = require('org.chromium.runtime.runtime');
var helpers = require('org.chromium.common.helpers');
var eventsToFireOnStartUp = [];
var notifications = null;
var notificationOptions = null;

function resolveUri(uri) {
    if (uri.indexOf('chrome-extension') === 0) {
        return uri;
    } else {
        return runtime.getURL(uri);
    }
}

function removeNotification(notificationId) {
    delete notifications[notificationId];
    delete notificationOptions[notificationId];
    storeNotifications();
}

function setNotification(notificationId, options) {
    notifications[notificationId] = true;
    // Store a copy of the options used to create/update the notification
    //  - Must be a separate copy, in case the caller later mutates the object
    notificationOptions[notificationId] = JSON.parse(JSON.stringify(options));
    storeNotifications();
}

function storeNotifications() {<commit_msg>Update JS dependency requires to use NPM plugin ids<commit_after>// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

var Event = require('cordova-plugin-chrome-apps-common.events');
var storage = require('cordova-plugin-chrome-apps-storage.Storage');
var exec = require('cordova/exec');
var channel = require('cordova/channel');
var runtime = require('cordova-plugin-chrome-apps-runtime.runtime');
var helpers = require('cordova-plugin-chrome-apps-common.helpers');
var eventsToFireOnStartUp = [];
var notifications = null;
var notificationOptions = null;

function resolveUri(uri) {
    if (uri.indexOf('chrome-extension') === 0) {
        return uri;
    } else {
        return runtime.getURL(uri);
    }
}

function removeNotification(notificationId) {
    delete notifications[notificationId];
    delete notificationOptions[notificationId];
    storeNotifications();
}

function setNotification(notificationId, options) {
    notifications[notificationId] = true;
    // Store a copy of the options used to create/update the notification
    //  - Must be a separate copy, in case the caller later mutates the object
    notificationOptions[notificationId] = JSON.parse(JSON.stringify(options));
    storeNotifications();
}

function storeNotifications() {
{'fraction_non_alphanumeric': 0.10952738184546136, 'fraction_numerical': 0.0037509377344336083, 'mean_word_length': 4.476386036960986, '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': '4285898', 'n_tokens_mistral': 716, 'n_tokens_neox': 697, 'n_words': 220}