UNPKG

xdesign-vue-next

Version:

XDesign Component for vue-next

128 lines (116 loc) 3.58 kB
/** * xdesign v1.0.6 * (c) 2023 xdesign * @license MIT */ import './dep-10a947a6.mjs'; import { _ as _arrayMap } from './dep-4903a8a8.mjs'; import { _ as _baseClone, a as _getAllKeysIn } from './dep-c4737535.mjs'; import { b as _baseGet, c as _castPath, a as _toKey } from './dep-fa6608fd.mjs'; import { l as last_1 } from './dep-e901316d.mjs'; import { _ as _baseSlice } from './dep-765678ef.mjs'; import { _ as _copyObject } from './dep-81c83986.mjs'; import { i as isPlainObject_1 } from './dep-ed4e7c50.mjs'; import { _ as _flatRest } from './dep-b57a2815.mjs'; var baseGet = _baseGet, baseSlice = _baseSlice; /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent$1(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } var _parent = parent$1; var castPath$1 = _castPath, last = last_1, parent = _parent, toKey = _toKey; /** * The base implementation of `_.unset`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset$1(object, path) { path = castPath$1(path, object); object = parent(object, path); return object == null || delete object[toKey(last(path))]; } var _baseUnset = baseUnset$1; var isPlainObject = isPlainObject_1; /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain * objects. * * @private * @param {*} value The value to inspect. * @param {string} key The key of the property to inspect. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ function customOmitClone$1(value) { return isPlainObject(value) ? undefined : value; } var _customOmitClone = customOmitClone$1; var arrayMap = _arrayMap, baseClone = _baseClone, baseUnset = _baseUnset, castPath = _castPath, copyObject = _copyObject, customOmitClone = _customOmitClone, flatRest = _flatRest, getAllKeysIn = _getAllKeysIn; /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable property paths of `object` that are not omitted. * * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ var omit = flatRest(function (object, paths) { var result = {}; if (object == null) { return result; } var isDeep = false; paths = arrayMap(paths, function (path) { path = castPath(path, object); isDeep || (isDeep = path.length > 1); return path; }); copyObject(object, getAllKeysIn(object), result); if (isDeep) { result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } var length = paths.length; while (length--) { baseUnset(result, paths[length]); } return result; }); var omit_1 = omit; export { _baseUnset as _, omit_1 as o }; //# sourceMappingURL=dep-60f1d7ee.mjs.map