1.2.1 • Published 2 years ago

dechexbin v1.2.1

Weekly downloads
9
License
MIT
Repository
github
Last release
2 years ago

Converter for various number systems.

Syntax


newValue = DecHexBin(oldValue, oldType, newType, [numberSystem]);

oldType and newType can be a string ("dec", "hex", "bin") or a number (16 for hex, 10 for dec, etc) or a cypher ("#0123456789", the hashtag is required)

numberSystem can be Number or BigInt (or something similar). By default it's Number.

Warning: The default cypher uses uppercase letters, i.e. use FF instead of ff

Example


var DecHexBin = require("dechexbin");

console.log(DecHexBin("FF", "hex", "dec")); // 255
    
console.log(DecHexBin("1111", "bin", 8)); // 17

console.log(DecHexBin("3120434303123", 5, "#Kartoffelsalat")); // ellfsarf

Other


DecHexBin uses normal numbers by default. You can use BigInts by using another argument:

var DecHexBin = require("dechexbin");

console.log(DecHexBin("FFFFFFFFFFFFFFFF", 16, 10, BigInt));
1.2.0

2 years ago

1.2.1

2 years ago

1.1.0

4 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago