What am I doing wrong?
#ES5:
require(‘urlify’).create()
#ES6 Doesn’t work:
import {create} from ‘urlify’
#node #javascript
-
-
Replying to @yoshuawuyts
@yoshuawuyts ⇒ babel-node > import {create} from 'urlify' 'use strict' ReferenceError: create is not defined1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts Interestingly I’m not wanting to use urlify. It was just to test derived properties in#AmpersandJS State. But now I’m piqued.1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts > var x = {a:1} 'use strict' > var {thing} = x 'use strict' > thing undefined WTF?1 reply 0 retweets 0 likes
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.