old_contents: import { stringifyOperations } from '../utils';
  
  const render = {};
  
  /**
   * ### Render
   *
   * @module render
   */
  export default (state) => {
    /**
     * Get URL for rendering an image.
     *
     * ```js
     * rokka.render.getUrl('myorg', 'c421f4e8cefe0fd3aab22832f51e85bacda0a47a', 'png', 'mystack')
     * ```
     *
     * @param  {string}       organization name
     * @param  {string}       hash         image hash
     * @param  {string}       format       image format: `jpg`, `png` or `gif`
     * @param  {string|array} mixed        stack operation name or array of stack operation objects
     * @return {string}
     */
    render.getUrl = (organization, hash, format, mixed) => {
      const host = state.renderHost.replace('{organization}', organization);
      const mixedParam = Array.isArray(mixed)
        ? stringifyOperations(mixed) // array of operations
        : mixed; // stack name
      const stack = mixedParam ? `${mixedParam}` : 'original';
  
      return `${host}/${stack}/${hash}.${format}`;
    };
  
    return {
      render
    };
  };
  
new_contents: import { stringifyOperations } from '../utils';
  
  const render = {};
  
  /**
   * ### Render
   *
   * @module render
   */
  export default (state) => {
    /**
     * Get URL for rendering an image.
     *
     * ```js
     * rokka.render.getUrl('myorg', 'c421f4e8cefe0fd3aab22832f51e85bacda0a47a', 'png', 'mystack')
     * ```
     *
     * @param  {string}       organization name
     * @param  {string}       hash         image hash
     * @param  {string}       format       image format: `jpg`, `png` or `gif`
     * @param  {string|array} mixed        stack operation name or array of stack operation objects
     * @return {string}
     */
    render.getUrl = (organization, hash, format, mixed) => {
      const host = state.renderHost.replace('{organization}', organization);
      const mixedParam = Array.isArray(mixed)
        ? `dynamic/${stringifyOperations(mixed)}` // array of operations
        : mixed; // stack name
      const stack = mixedParam ? `${mixedParam}` : 'original';
  
      return `${host}/${stack}/${hash}.${format}`;
    };
  
    return {
      render
    };
  };
  
subject: fix render.getUrl with dynamic stack operations