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 > import * as foo from 'urlify' 'use strict' > foo { create: [Function], default: { create: [Function] } }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.