Created
          November 7, 2016 22:07 
        
      - 
      
- 
        Save elado/d86f04b8d5cf7e3c6f92c207162d4aea to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function urlEncodedTaggedString(strings, ...substitutions) { | |
| let result = strings[0] | |
| for (let i = 0; i < substitutions.length; ++i) { | |
| result += encodeURIComponent(substitutions[i]) | |
| result += strings[i + 1] | |
| } | |
| return result | |
| } | |
| let name = 'I have ? and #!' | |
| let url = urlEncodedTaggedString`/person/${name}` | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment