@azizbecha/strkit
Version:
strkit is a utility library offering a collection of essential string functions including validation, case conversion, truncation, and more. Ideal for both JavaScript and TypeScript developers to simplify string operations in their applications.
28 lines • 1.02 kB
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = decodeURL;
/**
* Decodes a percent-encoded URL or string back to its original form.
* Converts percent-encoded characters into their actual representation.
*
* @param url - The encoded URL or string to decode.
* @returns The decoded URL.
*
* @example
* decodeURL("https%3A%2F%2Fexample.com%2Fquery%3Fname%3DJohn%20Doe%26age%3D25");
* // Output: "https://example.com/query?name=John Doe&age=25"
*/
function decodeURL(url) {
return decodeURIComponent(url);
}
});
//# sourceMappingURL=decodeURL.js.map