decode-uri-component.js 350 B

1234567891011
  1. // Copyright 2017 Simon Lydell
  2. // X11 (“MIT”) Licensed. (See LICENSE.)
  3. var decodeUriComponent = require("decode-uri-component")
  4. function customDecodeUriComponent(string) {
  5. // `decodeUriComponent` turns `+` into ` `, but that's not wanted.
  6. return decodeUriComponent(string.replace(/\+/g, "%2B"))
  7. }
  8. module.exports = customDecodeUriComponent