function configGet(path) {
  const parts = typeof path === 'string' ? path.split('.') : path;

  if (parts.length === 0) {
    throw new Error(
      'You must provide the path to the configuration value you would like to consume.',
    );
  }
  let result = resolveConfigForBrowserOrServer();
  for (let i = 0; i < parts.length; i += 1) {
    if (result === undefined) {
      const errorMessage = `Failed to resolve configuration value at "${parts.join('.')}".`;
      // This "if" block gets stripped away by webpack for production builds.
      if (process.env.BUILD_FLAG_IS_DEV === 'true' && process.env.BUILD_FLAG_IS_CLIENT === 'true') {
        throw new Error(
          `${errorMessage} We have noticed that you are trying to access this configuration value from the client bundle (i.e. code that will be executed in a browser). For configuration values to be exposed to the client bundle you must ensure that the path is added to the client configuration filter in the project configuration values file.`,
        );
      }
      throw new Error(errorMessage);
    }
    result = result[parts[i]];
  }
  return result;
}
This function wraps up the boilerplate needed to access the correct
configuration depending on whether your code will get executed in the
browser/node.

i.e.
 - For the browser the config values are available at window.__CLIENT_CONFIG__
 - For a node process they are within the "<root>/config".

To request a configuration value you must provide the repective path. For
example, f you had the following configuration structure:
  {
    foo: {
      bar: [1, 2, 3]
    },
    bob: 'bob'
  }

You could use this function to access "bar" like so:
  import config from '../config';
  const value = config('foo.bar');

And you could access "bob" like so:
  import config from '../config';
  const value = config('bob');

If any part of the path isn't available as a configuration key/value then
an error will be thrown indicating that a respective configuration value
could not be found at the given path.