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