"use strict";

const os = require('os');
const fs = require('fs');
const path = require('path');

const platform = os.platform();
const arch = os.arch();
const libPath = path.join(__dirname, `./native/${platform}/${arch}/Aspose.Words.node`);

if (!fs.existsSync(libPath)) {
    throw Error(`Unsupported platform: ${platform}/${arch}`);
}

const lib = require(libPath);
module.exports = lib.Aspose.Words;