Skip to content

Commit 030e23b

Browse files
committed
[guide] Fix npm package has usage example
1 parent 036612e commit 030e23b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ Other Style Guides
298298
299299
// best
300300
const has = Object.prototype.hasOwnProperty; // cache the lookup once, in module scope.
301+
console.log(has.call(object, key));
301302
/* or */
302303
import has from 'has'; // https://www.npmjs.com/package/has
303-
// ...
304-
console.log(has.call(object, key));
304+
console.log(has(object, key));
305305
```
306306

307307
<a name="objects--rest-spread"></a>

0 commit comments

Comments
 (0)