# fo-matters

> Helpful formatting tools for strings and numbers.

Latest version **0.2.1** (published 2019-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install fo-matters
pnpm add fo-matters
yarn add fo-matters
bun add fo-matters
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2019-08-11 |
| First published | 2019-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bryan Ricci |
| Maintainers | bryanricci |
| Keywords | formatting, formats, strings, numbers |

## Links

- npm: https://www.npmjs.com/package/fo-matters
- Repository: https://github.com/riccijs/fo-matters
- Homepage: https://github.com/riccijs/fo-matters#readme
- Issues: https://github.com/riccijs/fo-matters/issues
- npm.io page: https://npm.io/package/fo-matters

## 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

- 0.2.1 (latest) — 2019-08-11
- 0.2.0 — 2019-08-11
- 0.1.1 — 2019-08-10
- 0.1.0 — 2019-08-10

## README

FO-Matters
=============

A collection of formatting tool, useful for formatting strings, numbers, and currency.

[![npm module](https://img.shields.io/npm/v/fo-matters/latest.svg)](https://www.npmjs.org/package/fo-matters)
[![dependencies](https://david-dm.org/riccijs/fo-matters.svg)](https://david-dm.org/riccijs/fo-matters)



About FO-Matters?
----------

We are in the beginning stages of this project. Currently, there are minimal tools for formatting strings, numbers, and currency (USD ONLY), but we will be adding more in the near future!

Full typescript support! :)



Installation
------------

To use with node:

```bash
$ npm install fo-matters --save
```

Javascript:

```javascript
const fo = require('fo-matters');
```

ES6 and above:

```javascript
import fo from 'fo-matters'
```

(note that using `latest` is taking a significant risk that fo-matters API changes could break your code.)



API
-------------

```js
import fo from 'fo-matters'

// Strings

fo.lettersOnly('alph@123')
// ===> 'alph'

fo.alphaNumericOnly('alph@123')
// ===> 'alph123'

fo.minLength('alph@123', 10)
// ===> false

fo.maxLength('alph@123', 4)
// ===> 'alph'

fo.capitalizeFirstLetter('alph@123')
// ===> 'Alph@123'


// Numbers

fo.number(91234.56)
// ===> '91,234.56'

fo.numberRound(91234.56)
// ===> '91,235'

fo.stripNumber('91,234.56')
// ===> 91234.56


// Currency (USD ONLY)

fo.currency(91234.56)
// ===> '$91,234.56'

fo.currencyRound(91234.56)
// ===> '$91,235'

fo.stripCurrency('$91,234.56')
// ===> 91234.56
```


Acknowledgements
-----------------

Thanks to Bryan Ricci!
License [MIT](https://opensource.org/licenses/MIT).

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