Innovenergy_trunk/frontend/node_modules/testcafe/lib/utils/moment-loader.js

22 lines
2.6 KiB
JavaScript
Raw Permalink Normal View History

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const moment_duration_format_commonjs_1 = __importDefault(require("moment-duration-format-commonjs"));
const MOMENT_MODULE_NAME = 'moment';
function loadMomentModule() {
const momentModulePath = require.resolve(MOMENT_MODULE_NAME);
const savedMomentModule = require.cache[momentModulePath];
delete require.cache[savedMomentModule];
const moment = require(momentModulePath);
(0, moment_duration_format_commonjs_1.default)(moment);
if (savedMomentModule)
require.cache[momentModulePath] = savedMomentModule;
else
delete require.cache[momentModulePath];
return moment;
}
exports.default = loadMomentModule();
module.exports = exports.default;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9tZW50LWxvYWRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9tb21lbnQtbG9hZGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsc0dBQXdFO0FBR3hFLE1BQU0sa0JBQWtCLEdBQUcsUUFBUSxDQUFDO0FBRXBDLFNBQVMsZ0JBQWdCO0lBQ3JCLE1BQU0sZ0JBQWdCLEdBQUksT0FBTyxDQUFDLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0lBQzlELE1BQU0saUJBQWlCLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO0lBRTFELE9BQU8sT0FBTyxDQUFDLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDO0lBRXhDLE1BQU0sTUFBTSxHQUFHLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO0lBRXpDLElBQUEseUNBQXlCLEVBQUMsTUFBTSxDQUFD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