Last active
August 23, 2016 14:11
-
-
Save fabiodamasceno/1f1cfa6764e63ecb8905e6573c138cce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//doSomething.js > es6 v2 | |
import Promise from 'bluebird' | |
export function sum(a, b) { | |
return a + b | |
} | |
export default (a, b) => { | |
let p = new Promise() | |
if(a > b) | |
p.reject() | |
p.resolve() | |
} | |
//index.js | |
import doSomething from ‘./doSomething’ | |
import {sum} from ‘./doSomething’ // –> importando somente a função necessária de forma explícita S2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment