What am I doing wrong?
#ES5:
require(‘urlify’).create()
#ES6 Doesn’t work:
import {create} from ‘urlify’
#node #javascript
@gyaresu hah, yeah. Me too. Never used import / Object destructuring before so curious to know what's going on.
-
-
@yoshuawuyts > var x = {a:1} 'use strict' > var {thing} = x 'use strict' > thing undefined WTF? -
@gyaresu how about: `var x = {a: 1}; var {a} = x; console.log(a);`
End of conversation
New conversation -
-
-
@yoshuawuyts :D updated babel: > import {create} from urlify SyntaxError: repl: Unexpected token (1:21) /me goes deeperThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.