diff --git a/index.js b/index.js index bc2b9ed..0d9de9d 100644 --- a/index.js +++ b/index.js @@ -16,10 +16,7 @@ const give = (data) => const init = async () => { const [path, filetype] = process.argv.slice(2); - const lang = - filetype.substring(0, "typescript".length) === "typescript" - ? Lang.TYPESCRIPT - : Lang.JAVASCRIPT; + const lang = filetype[0] === "t" ? Lang.TYPESCRIPT : Lang.JAVASCRIPT; const contents = await receive(); const emitter = importCost(path, contents, lang);