@ctx-core/object
Advanced tools
Comparing version 5.0.4 to 5.1.0
15
lib.js
@@ -55,2 +55,17 @@ import { _andand } from '@ctx-core/function' | ||
/** | ||
* If a key is given, returns boolean of whether or not the given key is a member of the obj. | ||
* If no key is given, returns a boolean of whether or not the obj has any key. | ||
* @param {*}obj | ||
* @param {string=}key | ||
* @returns {boolean} | ||
*/ | ||
export function _has__key(obj, key) { | ||
const keys__ = keys(obj) | ||
return( | ||
key | ||
? keys__.indexOf(key) > -1 | ||
: !!keys__.length | ||
) | ||
} | ||
/** | ||
* Returns the obj with default values. If `obj[key] == null`, use `default[key]` | ||
@@ -57,0 +72,0 @@ * @param {*} obj |
{ | ||
"name": "@ctx-core/object", | ||
"version": "5.0.4", | ||
"version": "5.1.0", | ||
"description": "ctx-core object", | ||
@@ -30,3 +30,3 @@ "main": "lib.js", | ||
}, | ||
"gitHead": "533f71da75d0fd20cc2584c84d0649306d3b3db7" | ||
"gitHead": "e165f97f474d72eddc0bd028d5c9384349ff4f15" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13018
483