lib/yandex-speller.js
function checkText(text, callback, settings) {
    const form = prepareSettings(settings);
    form.text = text;

    post({
        host: YASPELLER_HOST,
        path: YASPELLER_PATH + 'checkText',
        form: form,
    }, function(error, response, body) {
        if (error) {
            callback(error, null);
        } else {
            if (response.statusCode === 200) {
                callback(null, body);
            } else {
                callback(
                    Error('Yandex.Speller API returns status code is ' +
              response.statusCode, null)
                );
            }
        }
    });
}
function checkText(text, callback, settings) {
    const form = prepareSettings(settings);
    form.text = text;

    post({
        host: YASPELLER_HOST,
        path: YASPELLER_PATH + 'checkText',
        form: form,
    }, function(error, response, body) {
        if (error) {
            callback(error, null);
        } else {
            if (response.statusCode === 200) {
                callback(null, body);
            } else {
                callback(
                    Error('Yandex.Speller API returns status code is ' +
              response.statusCode, null)
                );
            }
        }
    });
}
function checkText ( text , callback , settings ) { const form = prepareSettings ( settings ) ; form . text = text ; post ( { host : YASPELLER_HOST , path : YASPELLER_PATH + 'checkText' , form : form , } , function ( error , response , body ) { if ( error ) { callback ( error , null ) ; } else { if ( response . statusCode === 200 ) { callback ( null , body ) ; } else { callback ( Error ( 'Yandex.Speller API returns status code is ' + response . statusCode , null ) ) ; } } } ) ; }
Check text for typos.

@param {string} text
@param {Function} callback
@param {Settings} settings
@see {@link https://tech.yandex.ru/speller/doc/dg/reference/checkText-docpage/}
Check text for typos .