geraintluff / uri-templates

JavaScript utility for RFC 6570: URI Templates
138 stars 21 forks source link

Added new "leaveUnmatchedPlaceholders" option #21

Open tjenkinson opened 8 years ago

tjenkinson commented 8 years ago

This option leaves placeholders that don't have any matches in the URL.

Useful as it means you can handle replacements at various stages in an application. In my case I want to cache the response from an early stage, but still allow some of placeholders to be in the cached version so they can be replaced more frequently later on.