# dex

> Translate data from base-from into base-to and back

Latest version **1.1.0** (published 2015-02-03) · MIT license · 0 weekly downloads

## Install

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

Provides the command `dex`.

## 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.1.0 |
| Published | 2015-02-03 |
| First published | 2015-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Nicolas Bevacqua |
| Maintainers | bevacqua |

## Links

- npm: https://www.npmjs.com/package/dex
- Repository: https://github.com/bevacqua/dex
- Issues: https://github.com/bevacqua/dex/issues
- npm.io page: https://npm.io/package/dex

## Recent versions

- 1.1.0 (latest) — 2015-02-03
- 1.0.0 — 2015-02-03

## README

# dex

> Translate data from **base<sub>`a`</sub>** into **base<sub>`n`</sub>** and back

# Install

From `npm`

```shell
npm install --save dex
```

# `dex.hex(input)`

Returns `input` converted into **base<sub>16</sub>** representation. Assumes `input` is a **base<sub>10</sub>** string, or a `Number`.

# `dex.dec(input)`

Returns `input` converted into **base<sub>10</sub>** representation. Assumes `input` is a **base<sub>16</sub>** string.

# `dex(input, from, to)`

Returns `input` converted into **base<sub>`to`</sub>** representation. Assumes `input` is a **base<sub>`from`</sub>** string.

# Notes

- `dex` accepts only non-empty strings and numeric `input`s, every other `input` value will result in `null` being returned
- `input` gets lowercased by `dex`, so you don't need to
- Result is always a lowercase string representation of the number in the requested notation

# CLI

```shell
dex <input> [from] [to]
```

Prints to standard output the results of doing `dex(input, from=16, to=10)`.

# License

MIT

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