From abd94a7f5a50f43c797a11b53549ae48fff667c3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 10 Oct 2016 03:43:44 +0200 Subject: add node_modules to address #4364 --- node_modules/babylon/lib/options.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 node_modules/babylon/lib/options.js (limited to 'node_modules/babylon/lib/options.js') diff --git a/node_modules/babylon/lib/options.js b/node_modules/babylon/lib/options.js new file mode 100755 index 000000000..62b51a154 --- /dev/null +++ b/node_modules/babylon/lib/options.js @@ -0,0 +1,33 @@ +"use strict"; + +exports.__esModule = true; +exports.getOptions = getOptions; +// A second optional argument can be given to further configure +var defaultOptions = exports.defaultOptions = { + // Source type ("script" or "module") for different semantics + sourceType: "script", + // Source filename. + sourceFilename: undefined, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // TODO + allowSuperOutsideMethod: false, + // An array of plugins to enable + plugins: [], + // TODO + strictMode: null +}; + +// Interpret and default an options object + +function getOptions(opts) { + var options = {}; + for (var key in defaultOptions) { + options[key] = opts && key in opts ? opts[key] : defaultOptions[key]; + } + return options; +} \ No newline at end of file -- cgit v1.2.3