<commit_before>/*
    Copyright 2013-2014 appPlant UG

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

var Printer = function () {

};

Printer.prototype = {
    /**
     * Überprüft, ob der Drucker-Dienst verfügbar ist.
     *
     * @param {Function} callback
     * @param {Object?}  scope    callback scope (default: window)
     *
     * @return {Boolean}
     */
    isServiceAvailable: function (callback, scope) {
        var callbackFn = function () {
            var args = typeof arguments[0] == 'boolean' ? arguments : arguments[0];

            callback.apply(scope || window, args);
        };

        cordova.exec(callbackFn, null, 'Printer', 'isServiceAvailable', []);
    },

    /**
     * Übergibt den HTML-Content an den Drucker-Dienst.
     *
     * @param {String}  content HTML string or DOM node (if latter, innerHTML is used to get the contents)
     * @param {Object?} options platform specific options
     */
    print: function (content, options) {
        var page    = content.innerHTML || content,
            options = options || {};

        if (typeof page != 'string') {
            console.log('Print function requires an HTML string. Not an object');
            return;
        }

        cordova.exec(null, null, 'Printer', 'print', [page, options]);
    }
};

var plugin = new Printer();

module.exports = plugin;<commit_msg>Small doc changes<commit_after>/*
    Copyright 2013-2014 appPlant UG

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

var Printer = function () {

};

Printer.prototype = {
    /**
     * Checks if the printer service is avaible (iOS)
     * or if a printing app is installed on the device (Android).
     *
     * @param {Function} callback
     *      A callback function
     * @param {Object?} scope
     *      The scope of the callback (default: window)
     *
     * @return {Boolean}
     */
    isServiceAvailable: function (callback, scope) {
        var callbackFn = function () {
            var args = typeof arguments[0] == 'boolean' ? arguments : arguments[0];

            callback.apply(scope || window, args);
        };

        cordova.exec(callbackFn, null, 'Printer', 'isServiceAvailable', []);
    },

    /**
     * Sends the content to the printer app or service.
     *
     * @param {String} content
     *      HTML string or DOM node
     *      if latter, innerHTML is used to get the contents
     * @param {Object?} options
     *      Platform specific options
     */
    print: function (content, options) {
        var page    = content.innerHTML || content,
            options = options || {};

        if (typeof page != 'string') {
            console.log('Print function requires an HTML string. Not an object');
            return;
        }

        cordova.exec(null, null, 'Printer', 'print', [page, options]);
    }
};

var plugin = new Printer();

module.exports = plugin;
{'fraction_non_alphanumeric': 0.09006562570717357, 'fraction_numerical': 0.006336275175379045, 'mean_word_length': 2.5135135135135136, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1947395', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1142, 'n_words': 473}