# @types/modular-scale

> TypeScript definitions for modular-scale

Latest version **5.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/modular-scale
pnpm add @types/modular-scale
yarn add @types/modular-scale
bun add @types/modular-scale
```

## Health

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

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.1.4 |
| Published | 2023-11-07 |
| First published | 2018-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/modular-scale
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/modular-scale
- npm.io page: https://npm.io/package/@types/modular-scale

## Recent versions

- 5.1.4 (latest) — 2023-11-07
- 5.1.2 (ts3.6) — 2021-07-08
- 5.1.1 (ts2.0) — 2019-01-23
- 5.1.3 — 2023-10-18
- 5.1.0 — 2018-12-25

## README

# Installation
> `npm install --save @types/modular-scale`

# Summary
This package contains type definitions for modular-scale (https://github.com/kristoferjoseph/modular-scale).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/modular-scale.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/modular-scale/index.d.ts)
````ts
export interface ModularScaleOptions {
    /** The ratio to use in the generated type scale function. Defaults to ModularScaleRatio.goldenSection */
    ratio?: number | undefined;

    /** The base font size (in pixels) to use for the type scale. Defaults to 16 */
    base?: number | string | undefined;
}

export interface ModularScaleRatio {
    minorSecond: number;
    majorSecond: number;
    minorThird: number;
    majorThird: number;
    perfectFourth: number;
    augFourth: number;
    perfectFifth: number;
    minorSixth: number;
    goldenSection: number;
    majorSixth: number;
    minorSeventh: number;
    majorSeventh: number;
    octave: number;
    majorTenth: number;
    majorEleventh: number;
    majorTwelfth: number;
    doubleOctave: number;
}

export interface modularScale {
    (step: number, relative?: boolean): number;
    steps(steps: number, relative?: boolean): number[];
}

export const ratios: ModularScaleRatio;

export default function ModularScale(options: ModularScaleOptions): modularScale;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Mike Fowler](https://github.com/mikefowler).

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