<commit_before>/*
 * PSPDFKit.js
 *
 *   PSPDFKit
 *
 *   Copyright (c) 2015 PSPDFKit GmbH. All rights reserved.
 *
 *   THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
 *   AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
 *   UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
 *   This notice may not be removed from this file.
 */

var exec = require('cordova/exec');

exports.showDocument = function (uri, success, error) {
    exec(success, error, "PSPDFKitCordovaPlugin", "showDocument", [uri]);
};

exports.showDocumentFromAssets = function (assetFile, success, error) {
    exec(success, error, "PSPDFKitCordovaPlugin", "showDocumentFromAssets", [assetFile]);
};<commit_msg>Docs: Add comments to Javascript API functions<commit_after>/*
 * PSPDFKit.js
 *
 *   PSPDFKit
 *
 *   Copyright (c) 2015 PSPDFKit GmbH. All rights reserved.
 *
 *   THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
 *   AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
 *   UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
 *   This notice may not be removed from this file.
 */

var exec = require('cordova/exec');

/**
 * Opens the PSPDFKitActivity to show a document from the local device file system.
 *
 * @param uri     The local filesystem URI of the document to show.
 * @param success Success callback function.
 * @param error   Error callback function.
 */
exports.showDocument = function (uri, success, error) {
    exec(success, error, "PSPDFKitCordovaPlugin", "showDocument", [uri]);
};

/**
 * Opens the PSPDFKitActivity to show a document from the app's assets folder. This
 * method copies the file to the internal app directory on the device before showing
 * it.
 *
 * @param assetFile Relative path within the app's assets folder.
 * @param success   Success callback function.
 * @param error     Error callback function.
 */
exports.showDocumentFromAssets = function (assetFile, success, error) {
    exec(success, error, "PSPDFKitCordovaPlugin", "showDocumentFromAssets", [assetFile]);
};
{'fraction_non_alphanumeric': 0.08641425389755011, 'fraction_numerical': 0.0035634743875278397, 'mean_word_length': 4.187066974595843, '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': '7342816', 'n_tokens_mistral': 714, 'n_tokens_neox': 675, 'n_words': 251}