From 9f41ffe7d193e687bcade06c47fd138ad26fa619 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 3 Jan 2024 10:06:28 +0000 Subject: [PATCH] fmt --- packages/string-templates/src/index.cjs | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/string-templates/src/index.cjs b/packages/string-templates/src/index.cjs index cf124b736b..0817afdb90 100644 --- a/packages/string-templates/src/index.cjs +++ b/packages/string-templates/src/index.cjs @@ -22,19 +22,19 @@ module.exports.setJSRunner = templates.setJSRunner module.exports.FIND_ANY_HBS_REGEX = templates.FIND_ANY_HBS_REGEX if (!process.env.NO_JS) { - const vm = require("vm") - const { setJSRunner } = require("./helpers/javascript") - /** - * Use vm to run JS scripts in a node Env - */ - setJSRunner((js, context) => { - context = { - ...context, - alert: undefined, - setInterval: undefined, - setTimeout: undefined, - } - vm.createContext(context) - return vm.runInNewContext(js, context, {timeout: 1000}) - }) + const vm = require("vm") + const {setJSRunner} = require("./helpers/javascript") + /** + * Use vm to run JS scripts in a node Env + */ + setJSRunner((js, context) => { + context = { + ...context, + alert: undefined, + setInterval: undefined, + setTimeout: undefined, + } + vm.createContext(context) + return vm.runInNewContext(js, context, {timeout: 1000}) + }) } \ No newline at end of file