Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord-convertor

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-convertor - npm Package Compare versions

Comparing version 1.0.3 to 2.0.0

cache.json

2

.upm/store.json

@@ -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"}}}

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc