mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
R=jacktfranklin@chromium.org Bug: None Change-Id: I587b974f2ff787fa2c0560863d702140f2eff9e2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5953149 Reviewed-by: Philip Pfaffe <pfaffe@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
hasown 
A robust, ES3 compatible, "has own property" predicate.
Example
const assert = require('assert');
const hasOwn = require('hasown');
assert.equal(hasOwn({}, 'toString'), false);
assert.equal(hasOwn([], 'length'), true);
assert.equal(hasOwn({ a: 42 }, 'a'), true);
Tests
Simply clone the repo, npm install, and run npm test
