# dechexbin

> Converter for various number systems.

Latest version **1.2.1** (published 2022-06-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install dechexbin
pnpm add dechexbin
yarn add dechexbin
bun add dechexbin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2022-06-10 |
| First published | 2019-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dark |
| Maintainers | dark_ |
| Keywords | number-system, number, convert, hex, dec, bin, dec2hex, dec2bin, bin2hex, bin2dec, hex2dec, hex2bin |

## Links

- npm: https://www.npmjs.com/package/dechexbin
- Repository: https://github.com/JustANutshell/DecHexBin
- Homepage: https://github.com/JustANutshell/DecHexBin#readme
- Issues: https://github.com/JustANutshell/DecHexBin/issues
- npm.io page: https://npm.io/package/dechexbin

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2022-06-10
- 1.2.0 — 2022-06-10
- 1.1.0 — 2020-03-31
- 1.0.13 — 2019-09-20
- 1.0.12 — 2019-09-06
- 1.0.11 — 2019-09-05
- 1.0.10 — 2019-08-29
- 1.0.9 — 2019-08-29
- 1.0.8 — 2019-08-28
- 1.0.7 — 2019-08-28
- 1.0.6 — 2019-08-27
- 1.0.5 — 2019-08-27
- 1.0.4 — 2019-08-27
- 1.0.3 — 2019-08-27
- 1.0.2 — 2019-08-27
- … 2 more at https://npm.io/package/dechexbin/versions

## README

Converter for various number systems.  

### Syntax
-----
```js
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
-----
```js
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:
```js
var DecHexBin = require("dechexbin");

console.log(DecHexBin("FFFFFFFFFFFFFFFF", 16, 10, BigInt));
```

---
_Source: https://npm.io/package/dechexbin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
