# reverse-utils

> A library to reverse individual digits in numbers or whole words in sentances.

Latest version **1.0.1** (published 2019-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install reverse-utils
pnpm add reverse-utils
yarn add reverse-utils
bun add reverse-utils
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-05-07 |
| First published | 2019-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Benson Trent |
| Maintainers | bensontrent |
| Keywords | Reverse, digits, words, sentances |

## Links

- npm: https://www.npmjs.com/package/reverse-utils
- Repository: https://github.com/bensontrent/reverse
- Homepage: https://github.com/bensontrent/reverse#readme
- Issues: https://github.com/bensontrent/reverse/issues
- npm.io page: https://npm.io/package/reverse-utils

## Recent versions

- 1.0.1 (latest) — 2019-05-07
- 1.0.0 — 2019-03-12

## README

# Reverse Utils

This repository is intended to respond to two interview questions:

1. How would you reverse words in a sentance?
2. How would you reverse the order of digits in a whole number?

This function reverses words in a sentance or reverses the order of individual digits in whole numbers

@param {string|number} Accepts either a string or integer to reversen indivdual digits of whole numbers.

@returns {string|number} For strings, a simple sentence can be entered and the order of words will be reversed. An attempt is made by the function to keep punctuation and capitalization where expected,
 
    ex: `"Life is beautiful!"` becomes `"Beautiful is life!"`.
 
 For numbers, the individual digits of the whole number will be reversed:

    example: `1234.9` becomes `4321`




## Install

`npm i reverse-utils`

## Usage

```
import reverse from 'reverse-utils';

reverse("Cool is this!");  // Result: "This is cool!"

reverse(4321) 
// Result: 1234
```

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