[guide] Fix npm package has usage example

This commit is contained in:
Mathieu Dutto
2019-07-24 15:36:48 +02:00
parent 036612ec3d
commit 030e23b13e

View File

@@ -298,10 +298,10 @@ Other Style Guides
// best
const has = Object.prototype.hasOwnProperty; // cache the lookup once, in module scope.
console.log(has.call(object, key));
/* or */
import has from 'has'; // https://www.npmjs.com/package/has
// ...
console.log(has.call(object, key));
console.log(has(object, key));
```
<a name="objects--rest-spread"></a>