Spaces:
Sleeping
Sleeping
File size: 1,161 Bytes
2434dca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.defaultOptions = void 0;
exports.getOptions = getOptions;
const defaultOptions = {
sourceType: "script",
sourceFilename: undefined,
startColumn: 0,
startLine: 1,
allowAwaitOutsideFunction: false,
allowReturnOutsideFunction: false,
allowNewTargetOutsideFunction: false,
allowImportExportEverywhere: false,
allowSuperOutsideMethod: false,
allowUndeclaredExports: false,
plugins: [],
strictMode: null,
ranges: false,
tokens: false,
createParenthesizedExpressions: false,
errorRecovery: false,
attachComment: true,
annexB: true
};
exports.defaultOptions = defaultOptions;
function getOptions(opts) {
if (opts == null) {
return Object.assign({}, defaultOptions);
}
if (opts.annexB != null && opts.annexB !== false) {
throw new Error("The `annexB` option can only be set to `false`.");
}
const options = {};
for (const key of Object.keys(defaultOptions)) {
var _opts$key;
options[key] = (_opts$key = opts[key]) != null ? _opts$key : defaultOptions[key];
}
return options;
}
//# sourceMappingURL=options.js.map
|