<commit_before>class QrAPI {
    constructor(apiUrl, apiPassword) {
        this.apiUrl = apiUrl;
        this.apiPassword = <PASSWORD>Password;
    }
    setPassword(password) {
        this.apiPassword = password;
    }
    getHistory() {
        return this.scanRequest("");
    }
    scanRequest(barcode) {
        'use strict';
        return new Promise($.post(
            this.apiUrl,
            {
                "qrcode": barcode,
                "password": <PASSWORD>.apiPassword
            },
            null,
            'json'
        ))
    }
}<commit_msg>Properly convert jQuery Deferred to es6 Promise<commit_after>class QrAPI {
    constructor(apiUrl, apiPassword) {
        this.apiUrl = apiUrl;
        this.apiPassword = <PASSWORD>;
    }
    setPassword(password) {
        this.apiPassword = password;
    }
    getHistory() {
        return this.scanRequest("");
    }
    scanRequest(barcode) {
        'use strict';
        return Promise.resolve($.post(
            this.apiUrl,
            {
                "qrcode": barcode,
                "password": this.apiPassword
            },
            null,
            'json'
        ))
    }
}
{'fraction_non_alphanumeric': 0.11158432708688246, 'fraction_numerical': 0.0008517887563884157, 'mean_word_length': 1.5268817204301075, 'pattern_counts': {'":': 4, '<': 6, '<?xml version=': 0, '>': 6, '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': '1951688', 'n_tokens_mistral': 336, 'n_tokens_neox': 330, 'n_words': 59}