UNPKG

@segment/analytics-next

Version:

Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.

16 lines 513 B
/** * Tries to gets the unencoded version of an encoded component of a * Uniform Resource Identifier (URI). If input string is malformed, * returns it back as-is. * * Note: All occurences of the `+` character become ` ` (spaces). **/ export function gracefulDecodeURIComponent(encodedURIComponent) { try { return decodeURIComponent(encodedURIComponent.replace(/\+/g, ' ')); } catch (_a) { return encodedURIComponent; } } //# sourceMappingURL=gracefulDecodeURIComponent.js.map