UNPKG

@apollo/client

Version:

A fully-featured caching GraphQL client.

27 lines (26 loc) 706 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.compact = compact; /** * Merges the provided objects shallowly and removes * all properties with an `undefined` value * * @internal * * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time. */ function compact(...objects) { const result = {}; objects.forEach((obj) => { if (!obj) return; Object.keys(obj).forEach((key) => { const value = obj[key]; if (value !== void 0) { result[key] = value; } }); }); return result; } //# sourceMappingURL=compact.cjs.map