Skip to content

Instantly share code, notes, and snippets.

@alexburner
Last active August 17, 2017 03:46
Show Gist options
  • Save alexburner/bdb65687130e9408b679d2dad9549168 to your computer and use it in GitHub Desktop.
Save alexburner/bdb65687130e9408b679d2dad9549168 to your computer and use it in GitHub Desktop.
// varyd/Math.js
export function lerp(min, max, val) { /*...*/ }
export function etc(yes, no, maybe) { /*...*/ }
export function coinFlip() { /*...*/ }
// varyd/geom.js
export function thing(vector, angle) { /*...*/ }
export function thang(voctor, dangle) { /*...*/ }
// varyd/index.js
import * as Maths from './Maths';
import * as geom from './geom';
export Maths;
export geom;
// Some User's Code:
import * as varyd from 'varyd'
varyd.Maths.lerp()
// OR
import { Maths } from 'varyd'
Maths.lerp()
// OR
import { lerp } from 'varyd/Maths'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment