Codacy update for module.js
This commit is contained in:
@ -57,7 +57,7 @@ try {
|
|||||||
// Store the data to be written
|
// Store the data to be written
|
||||||
const toWrite = isNodeSnippet
|
const toWrite = isNodeSnippet
|
||||||
? `${code
|
? `${code
|
||||||
.replace('const ' + snippetName, 'export const ' + snippetName)
|
.replace(`const ${snippetName}`,`export const ${snippetName}`)
|
||||||
// Prevents errors from being thrown in browser environment
|
// Prevents errors from being thrown in browser environment
|
||||||
.replace('require(', 'typeof require !== "undefined" && require(')}`
|
.replace('require(', 'typeof require !== "undefined" && require(')}`
|
||||||
: `export ${code}`;
|
: `export ${code}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user