Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
559 bytes
|
Line | |
---|
1 | /** Used for built-in method references. */
|
---|
2 | var objectProto = Object.prototype;
|
---|
3 |
|
---|
4 | /** Used to check objects for own properties. */
|
---|
5 | var hasOwnProperty = objectProto.hasOwnProperty;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * The base implementation of `_.has` without support for deep paths.
|
---|
9 | *
|
---|
10 | * @private
|
---|
11 | * @param {Object} [object] The object to query.
|
---|
12 | * @param {Array|string} key The key to check.
|
---|
13 | * @returns {boolean} Returns `true` if `key` exists, else `false`.
|
---|
14 | */
|
---|
15 | function baseHas(object, key) {
|
---|
16 | return object != null && hasOwnProperty.call(object, key);
|
---|
17 | }
|
---|
18 |
|
---|
19 | module.exports = baseHas;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.