From cc2ae950e545595d4f9e59739035c91f3eb07de7 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Fri, 9 Oct 2020 00:36:34 +0300 Subject: [PATCH] refactor: code --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 412953c..3f9a7fe 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; module.exports = (options) => { let importIndex = 0; - let createImportedName = + const createImportedName = (options && options.createImportedName) || ((importName /*, path*/) => `i__const_${importName.replace(/\W/g, "_")}_${importIndex++}`);