# @vallsjm/convert

> Formatter an Convert units from differents sports

Latest version **3.2.0** (published 2020-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vallsjm/convert
pnpm add @vallsjm/convert
yarn add @vallsjm/convert
bun add @vallsjm/convert
```

## 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 | 3.2.0 |
| Published | 2020-06-09 |
| First published | 2019-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jose María Rodríguez Valls |
| Maintainers | vallsjm |
| Keywords | formatter, convert, sport, units |

## Links

- npm: https://www.npmjs.com/package/@vallsjm/convert
- Repository: https://github.com/vallsjm/convert
- Homepage: https://github.com/vallsjm/convert#readme
- Issues: https://github.com/vallsjm/convert/issues
- npm.io page: https://npm.io/package/@vallsjm/convert

## Dependencies (4)

- [moment](https://npm.io/package/moment.md) ^2.19.1
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.26.0
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.24.1
- [babel-preset-stage-2](https://npm.io/package/babel-preset-stage-2.md) ^6.24.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 3.2.0 (latest) — 2020-06-09
- 3.1.0 — 2020-05-25
- 3.0.0 — 2019-10-28
- 2.1.0 — 2019-10-28
- 2.0.0 — 2019-10-28
- 1.0.0 — 2019-10-27

## README

# @vallsjm/convert

[![npm (scoped)](https://img.shields.io/npm/v/@vallsjm/convert.svg)](https://www.npmjs.com/package/@vallsjm/convert)

Formatter an Convert units from differents sports.

## Install

```
$ npm install @vallsjm/convert
```

## Example

```
$ npm start
```

## Usage

```js
import {Convert, Formatter} from '@vallsjm/convert'

let cv = new Convert({
    locale: 'es'
});

console.log("Convert");
console.log('5 Metros son ' + cv.convert(5, 'UNIT_YARDS') + ' Yardas');
console.log('5.468 Yardas son ' + cv.revert(5.468, 'UNIT_YARDS') + ' Metros');
console.log('Las Yardas tienen ' + cv.digits('UNIT_YARDS') + ' dígitos');
console.log('Mostrar Yardas con unidades ' + cv.units(5.468, 'UNIT_YARDS'));


let ft = new Formatter({
    locale: 'es',
    metrics: 'international'
});

console.log("");
console.log("Formatter");
console.log('500.4343434 Metros (ciclismo) son ' + ft.formatDistance(500.4343434));
console.log('500.4343434 Metros (ciclismo) son ' + ft.formatDistance(500.4343434, false));
console.log('500.4343434 Metros (ciclismo britanico) son ' + ft.metrics('english').formatDistance(500.4343434));

ft.metrics('international').sport('swimming');

console.log('500.4343434 Metros (natación) son ' + ft.formatDistance(500.4343434));
console.log('1572176282 Timestamp son ' + ft.sport('running').formatDate(1572176282));
console.log('1572176282 Timestamp (en inglés) son ' + ft.locale('en').formatDateTime(1572176282));
console.log('1572176282 Timestamp (en inglés) son ' + ft.formatDateDay(1572176282));

```

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