Skip to content

Instantly share code, notes, and snippets.

@jakeleboeuf
Last active May 3, 2018 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakeleboeuf/fa78cd9a318a95a0215ef49d8197b232 to your computer and use it in GitHub Desktop.
Save jakeleboeuf/fa78cd9a318a95a0215ef49d8197b232 to your computer and use it in GitHub Desktop.
API Options

API Option 1

import { Scale, Ratio } from 'natural-scale';

let opts = { interval: Ratio.AUGMENTED_FIFTH };

const step1 = MyScale(1, opts);
opts.unit = 'rem';
const step1InRem = MyScale(1, opts);

API Option 2

import { Scale, Ratio } from 'natural-scale';

const MyScale = Scale(Ratio.AUGMENTED_FIFTH);

const step1 = MyScale(1);
const step1InRem = MyScale(1, 'rem');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment