From c2a77cf7ec9de9eadf938046bdf78e58561c8a6d Mon Sep 17 00:00:00 2001 From: dave caruso Date: Wed, 2 Aug 2023 16:27:36 -0700 Subject: Rewrite built-in modules to use CommonJS over ESM (#3814) * stfdsafsd sadffdsa stuff finish commonjs stuff asdf not done but work not done but work not done yet but this is how far i am remove files lol update built files uncomment everything in events lol export default stuff * afdsafsd * its not perfect but almost done * okay * cool * remove temp file * finish rebase * revert settings.json * a * ch-ch-ch-ch-changes * okay * remove this check in release for now * sxdcfghnjm, * lkjhgf * fmt * filename can be null * Update NodeModuleModule.h * weee * fmt --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/js/builtins/codegen/helpers.ts | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/js/builtins/codegen/helpers.ts (limited to 'src/js/builtins/codegen/helpers.ts') diff --git a/src/js/builtins/codegen/helpers.ts b/src/js/builtins/codegen/helpers.ts deleted file mode 100644 index 6345f8ffa..000000000 --- a/src/js/builtins/codegen/helpers.ts +++ /dev/null @@ -1,25 +0,0 @@ -export function fmtCPPString(str: string) { - return ( - '"' + - str - .replace(/\\/g, "\\\\") - .replace(/"/g, '\\"') - .replace(/\n/g, "\\n") - .replace(/\r/g, "\\r") - .replace(/\t/g, "\\t") - .replace(/\?/g, "\\?") + // https://stackoverflow.com/questions/1234582 - '"' - ); -} - -export function cap(str: string) { - return str[0].toUpperCase() + str.slice(1); -} - -export function low(str: string) { - if (str.startsWith("JS")) { - return "js" + str.slice(2); - } - - return str[0].toLowerCase() + str.slice(1); -} -- cgit v1.2.3