How to use the falcor.keys function in falcor

To help you get started, we’ve selected a few falcor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thegazelle-ad / gazelle-server / src / lib / falcor / falcor-utilities.js View on Github external
export function cleanupFalcorKeys(obj) {
  if (obj === null || (typeof obj) !== 'object' || obj.cleanupFalcorKeysMetaSeen) return obj;
  const ret = {};
  // In order to handle circular objects, the key name is convoluted to make sure it's unique
  obj.cleanupFalcorKeysMetaSeen = true; // eslint-disable-line no-param-reassign
  falcor.keys(obj).forEach(key => {
    if (key === 'cleanupFalcorKeysMetaSeen') return;
    ret[key] = cleanupFalcorKeys(obj[key]);
  });
  // Cleanup to not have mutated the object
  delete obj.cleanupFalcorKeysMetaSeen; // eslint-disable-line no-param-reassign
  return ret;
}
github KillrVideo / killrvideo-web / src / client / js / stores / falcor-model.js View on Github external
export function falcorValues(obj) {
  return falcor.keys(obj).map(k => obj[k]);
};