meteor/meteor

View on GitHub
npm-packages/meteor-babel/parser.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";

const babelParser = require("@babel/parser");
const defaultParserOptions = require("@meteorjs/reify/lib/parsers/babel.js").options;

function parse(code, parserOptions) {
  return babelParser.parse(code, parserOptions || defaultParserOptions);
}

exports.parse = parse;