docs: function(str) {
    // Check for empty string
    if (str === '') {
      return '!';
    }
    // 1. URL encode
    // 2. URL encode all exclamation marks (replace ! with %21)
    // 3. URL encode all tilde (replace ~ with %7e)
    //    This ensures that when using ~ as separator in CompositeKey we can
    //    do prefix matching
    // 4. Replace % with exclamation marks for Azure compatibility
    return encodeURIComponent(str)
      .replace(/!/g, '%21')
      .replace(/~/g, '%7e')
      .replace(/%/g, '!');
  }