base

This tag convert from one base to another. The first param is the base to convert from and the second param is the base to convert to. It also splits the input with a comma.

Created by: hackvertor
Installed 1 times

Viewed: 35

Category: Math

Created on: Tuesday, October 15, 2024 at 11:40:22 AM

Updated on: Thursday, May 22, 2025 at 12:54:20 PM

This is a built in tag
Tag arguments
[
   {
      "type": "number",
      "help": "This provides the base to convert from",
      "defaultValue": "10"
   },
   {
      "type": "number",
      "help": "This provides the base to convert to",
      "defaultValue": "16"
   }
]
Code
class base {
  encode(input, from, to) {
    return input.split(",").map((num) => parseInt(num, from).toString(to));
  }
}