Reimplement 'babel-template' with better caching and tagged literal utilities.
This commit is contained in:
@@ -5,9 +5,9 @@ import template from "@babel/template";
|
||||
const helpers = {};
|
||||
export default helpers;
|
||||
|
||||
function defineHelper(str) {
|
||||
return template(str);
|
||||
}
|
||||
// Helpers never include placeholders, so we disable placeholder pattern
|
||||
// matching to allow us to use pattern-like variable names.
|
||||
const defineHelper = template({ placeholderPattern: false });
|
||||
|
||||
helpers.typeof = defineHelper(`
|
||||
export default function _typeof(obj) {
|
||||
|
||||
Reference in New Issue
Block a user