index.js
/**
 * Backend Method which acts as a template for captureByCoordinates function
 *
 * @private
 * @function
 * @returns {object} Returns JS Object which is parsed from executable's standard output JSON String.
 */
Backend Method which acts as a template for captureByCoordinates function
@private
@function
@returns {object} Returns JS Object which is parsed from executable's standard output JSON String.
Backend Method which acts as a template for captureByCoordinates function @private @function @returns { object } Returns JS Object which is parsed from executable ' s standard output JSON String .
function coordinatesMethod(options, programName) {
    if (!options) options={};
    let imageFormat = checkForImageFormatValidity(options);
    let coords = checkForCoordinatesValidity(options);
    let child = spawnSync("cmd.exe", ["/c", `${__dirname}\\libs\\${programName} ${coords.x1} ${coords.y1} ${coords.x2} ${coords.y2} ${imageFormat}`]);
    return JSON.parse(child.stdout.toString());
}
function coordinatesMethod ( options , programName ) { if ( ! options ) options = { } ; let imageFormat = checkForImageFormatValidity ( options ) ; let coords = checkForCoordinatesValidity ( options ) ; let child = spawnSync ( "cmd.exe" , [ "/c" , ` ${ __dirname } \\ \\ ${ programName } ${ coords . x1 } ${ coords . y1 } ${ coords . x2 } ${ coords . y2 } ${ imageFormat } ` ] ) ; return JSON . parse ( child . stdout . toString ( ) ) ; }
Backend Method which acts as a template for captureByCoordinates function
 @private
 @function
 @returns {object} Returns JS Object which is parsed from executable's standard output JSON String.
Backend Method which acts as a template for captureByCoordinates function @private @function @returns { object } Returns JS Object which is parsed from executable ' s standard output JSON String .