Use import instead of require

Don't recommend the use of require
(See 10.1)
This commit is contained in:
Mikael Finstad
2016-10-16 16:59:23 +02:00
committed by GitHub
parent a75efdfdb0
commit 978c0eecc2

View File

@@ -288,7 +288,7 @@ Other Style Guides
// best
const has = Object.prototype.hasOwnProperty; // cache the lookup once, in module scope.
/* or */
const has = require('has');
import has from 'has';
console.log(has.call(object, key));
```