index.wxs 242B

123456789
  1. function isObj(x) {
  2. var type = typeof x;
  3. return x !== null && (type === 'object' || type === 'function');
  4. }
  5. module.exports = function (option, valueKey) {
  6. return isObj(option) && option[valueKey] != null ? option[valueKey] : option;
  7. }