discord-convertor
Advanced tools
Comparing version 1.0.3 to 2.0.0
@@ -1,1 +0,1 @@ | ||
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"565f7517d1796969f03ef8c366e7c019","lockfileHash":"7cb39a3ebf6f086aacdd4aa4b71ad73e","guessedImportsHash":"9552bbe028cc9ccfc136b5b5ca042088"}}} | ||
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"5dc47e5dbc19063eb59d17f3c428a2c6","lockfileHash":"6867a42b349a6481f90db999ade4b814","guessedImportsHash":"5d1de2206aec08f91ca5ed1307bb3b9b"}}} |
21
index.js
@@ -1,1 +0,20 @@ | ||
module.exports = require('./src/index.js') | ||
const replaceAll = function(replaceThis, withThis, inThis) { | ||
withThis = withThis.replace(/\$/g, "$$$$"); | ||
return inThis.replace(new RegExp(replaceThis.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|<>\-\&])/g, "\\$&"), "g"), withThis); | ||
}; | ||
const convertor = (fromVersion, toVersion, code) => { | ||
if (fromVersion.code) code = fromVersion.code; | ||
if (fromVersion.toVersion) toVersion = fromVersion.toVersion; | ||
if (fromVersion.fromVersion) fromVersion = fromVersion.fromVersion; | ||
let totalChanges = 0; | ||
require("./cache.json").forEach(u => { | ||
if (code.includes(u[fromVersion])) { | ||
totalChanges++ | ||
code = replaceAll(u[fromVersion], u[toVersion], code) | ||
} | ||
}) | ||
return { code, totalChanges } | ||
} | ||
module.exports = convertor; |
{ | ||
"name": "discord-convertor", | ||
"version": "1.0.3", | ||
"description": "Convert Your Code From v11 To v12", | ||
"version": "2.0.0", | ||
"description": "To convert code from one version to another in discord.js The available versions are v11, v12 and 13", | ||
"main": "index.js", | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"start": "node index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/BADBOY671/discord-convertor.git" | ||
}, | ||
"keywords": [ | ||
"djs", | ||
"discord.js", | ||
"convert", | ||
"discord", | ||
"convertcode" | ||
], | ||
"author": "BADBOY", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/BADBOY671/discord-convertor/issues" | ||
}, | ||
"homepage": "https://github.com/BADBOY671/discord-convertor#readme" | ||
"author": "shuruhatik", | ||
"license": "MIT" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
13584
6
494
80
1
1
2