# modularscale

> Calculate a value from a modular scale

Latest version **2.0.1** (published 2017-04-08) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2017-04-08 |
| First published | 2015-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/modularscale) |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Kyle Mathews |
| Maintainers | kylemathews |
| Keywords | modular, modular-scale, modularscale, scale, typography |

## Links

- npm: https://www.npmjs.com/package/modularscale
- Repository: https://github.com/KyleAMathews/modularscale
- Issues: https://github.com/KyleAMathews/modularscale/issues
- npm.io page: https://npm.io/package/modularscale

## Dependencies (1)

- [lodash.isnumber](https://npm.io/package/lodash.isnumber.md) ^3.0.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2017-04-08
- 2.0.0 — 2017-02-27
- 1.0.2 — 2015-03-06
- 1.0.1 — 2015-03-04
- 1.0.0 — 2015-03-04

## README

# modularscale
Calculate a modular scale

Idea from http://www.modularscale.com/

## Install
`npm install modularscale`

## Usage
```javascript
var ms = require('modularscale');

// Defaults to using golden ratio
ms(1);
// --> 1.618

// Set desired ratio
ms(1, "minor second");
// --> 1.066

// See modularscale.com for the full list of preset ratios.
// You can also pass it any ratio you'd like.
```

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