# operations-with-fractional-numbers

> Function operationsWithFractionalNumbers for JavaScript.

Latest version **1.2.3** (published 2022-07-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install operations-with-fractional-numbers
pnpm add operations-with-fractional-numbers
yarn add operations-with-fractional-numbers
bun add operations-with-fractional-numbers
```

## 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.3 |
| Published | 2022-07-29 |
| First published | 2022-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dmytro Zadorozhnii |
| Maintainers | mars092 |
| Keywords | operationsWithFractionalNumbers, operations-with-fractional-numbers, Math, plugin, react, vue, angular |

## Links

- npm: https://www.npmjs.com/package/operations-with-fractional-numbers
- Repository: https://github.com/mars092/operations-with-fractional-numbers
- Homepage: https://github.com/mars092/operations-with-fractional-numbers#readme
- Issues: https://github.com/mars092/operations-with-fractional-numbers/issues
- npm.io page: https://npm.io/package/operations-with-fractional-numbers

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

- 1.2.3 (latest) — 2022-07-29
- 1.2.1 — 2022-04-04
- 1.2.0 — 2022-04-02
- 1.1.0 — 2022-04-02

## README

# Operations with fractional numbers

Function `operationsWithFractionalNumbers` for JavaScript.

```
operator - '*' | '-' | '+' | '/';
exp - number, Exponent (decimal logarithm of the base of the adjustment);
type - 'round' | 'floor' | 'ceil';
...args - number[];
```

```js
operationsWithFractionalNumbers(operator, exp, type, ...args)
```

## Installation

    npm i operations-with-fractional-numbers

## Usage

```js
import operationsWithFractionalNumbers from 'operations-with-fractional-numbers';

console.log(operationsWithFractionalNumbers('-', -2, 'floor', 0.03, 0.01));
// 0.02

console.log(operationsWithFractionalNumbers('+', -2, 'floor', 0.09, 0.01));
// 0.1

console.log(operationsWithFractionalNumbers('*', -2, 'floor', 0.2, 3));
// 0.6

console.log(operationsWithFractionalNumbers('/', -2, 'floor', 3.4, 3));
// 1.13
```

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