MCPcopy Create free account
hub / github.com/cloudinary/cloudinary_npm / pickOnlyExistingValues

Function pickOnlyExistingValues

lib/utils/index.js:1615–1625  ·  view source on GitHub ↗

* Returns a new object with key values from source based on the keys. * `null` or `undefined` values are not copied. * @private * @param {object} source The object to pick values from. * @param {...string} keys One or more keys to copy from source. * @return {object} A new object with the requi

(source, ...keys)

Source from the content-addressed store, hash-verified

1613 */
1614
1615function pickOnlyExistingValues(source, ...keys) {
1616 let result = {};
1617 if (source) {
1618 keys.forEach((key) => {
1619 if (source[key] != null) {
1620 result[key] = source[key];
1621 }
1622 });
1623 }
1624 return result;
1625}
1626
1627/**
1628 * Returns a JSON array as String.

Callers 14

deleteResourcesParamsFunction · 0.85
getResourceParamsFunction · 0.85
api.jsFile · 0.85
publishResourceFunction · 0.85
uploader.jsFile · 0.85
usersFunction · 0.85
access_keysFunction · 0.85
generate_access_keyFunction · 0.85
update_access_keyFunction · 0.85
extractUrlParamsFunction · 0.85
cloudinary_js_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected