# remcalc

> Calculate the `rem`'s from `px` values

Latest version **1.0.10** (published 2018-01-29) · MPL-2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2018-01-29 |
| First published | 2017-05-18 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Maintainers | wyatt, ramitos |
| Keywords | calc, rem, em, px, pixels, pixel |

## Links

- npm: https://www.npmjs.com/package/remcalc
- Repository: https://github.com/yldio/remcalc
- Homepage: https://github.com/yldio/remcalc#readme
- Issues: https://github.com/yldio/remcalc/issues
- npm.io page: https://npm.io/package/remcalc

## Dependencies (2)

- [bundlesize](https://npm.io/package/bundlesize.md) ^0.15.3
- [lodash.flatten](https://npm.io/package/lodash.flatten.md) ^4.4.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.10 (latest) — 2018-01-29
- 1.0.9 — 2017-10-10
- 1.0.8 — 2017-05-26
- 1.0.6 — 2017-05-26
- 1.0.5 — 2017-05-25
- 1.0.4 — 2017-05-25
- 1.0.3 — 2017-05-24
- 1.0.2 — 2017-05-24
- 1.0.1 — 2017-05-22
- 1.0.0 — 2017-05-18

## README

# remcalc

[![npm](https://img.shields.io/npm/v/remcalc.svg?style=flat-square)](https://www.npmjs.com/package/remcalc)
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg?style=flat-square)](https://opensource.org/licenses/MPL-2.0)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![Greenkeeper badge](https://img.shields.io/badge/greenkeeper-enabled-brightgreen.svg?style=flat-square)](https://greenkeeper.io/)

[![David](https://img.shields.io/david/yldio/remcalc.svg?style=flat-square)](https://david-dm.org/yldio/remcalc)
[![David](https://img.shields.io/david/dev/yldio/remcalc.svg?style=flat-square)](https://david-dm.org/yldio/remcalc?type=dev)

Calculate the `rem`'s from `px` values.

## Table of Contents

* [Install](#install)
* [Usage](#usage)
* [License](#license)

## Install

```
yarn add --dev remcalc
```

## Usage

```js
import remcalc from 'remcalc';
import assert from 'assert';

assert.deepEqual(
  remcalc.withBase(10, 1, 2, 3, 4),
  '0.1rem 0.2rem 0.3rem 0.4rem'
);

assert.deepEqual(remcalc('1'), '0.0625rem');

assert.deepEqual(remcalc('1px'), '0.0625rem');

assert.deepEqual(remcalc.withBase(10, '1px'), '0.1rem');

assert.deepEqual(
  remcalc('1', '2', '3', '4'),
  '0.0625rem 0.125rem 0.1875rem 0.25rem'
);

assert.deepEqual(
  remcalc('1px', '2px', '3px', '4px'),
  '0.0625rem 0.125rem 0.1875rem 0.25rem'
);

assert.deepEqual(
  remcalc.withBase(10, '1', '2', '3', '4'),
  '0.1rem 0.2rem 0.3rem 0.4rem'
);

assert.deepEqual(
  remcalc.withBase(10, '1px', '2px', '3px', '4px'),
  '0.1rem 0.2rem 0.3rem 0.4rem'
);

assert.deepEqual(remcalc('1 2 3 4'), '0.0625rem 0.125rem 0.1875rem 0.25rem');

assert.deepEqual(
  remcalc.withBase(10, '1 2 3 4'),
  '0.1rem 0.2rem 0.3rem 0.4rem'
);
```

## License

MPL-2.0

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