Skip to content

Instantly share code, notes, and snippets.

@ricca509
Last active July 19, 2016 10:02
Show Gist options
  • Save ricca509/d9412d62f2674855c5bc6ea904eea0ae to your computer and use it in GitHub Desktop.
Save ricca509/d9412d62f2674855c5bc6ea904eea0ae to your computer and use it in GitHub Desktop.
// math.js
export function sum(a, b) {
return a + b;
}
export default function sub(a, b) {
return a - b;
}
// main.js
import sub from './math';
import { sum } from './math'; // or const sum = require('./math').sum;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment