@igorkosta/urlparams 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/README.md CHANGED
@@ -10,6 +10,7 @@ Useful for parsing URLs, handling query strings, or normalizing request paramete
10
10
 
11
11
  ```bash
12
12
  npm install @igorkosta/urlparams
13
+ ```
13
14
 
14
15
  ## Basic Example
15
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igorkosta/urlparams",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "URL Params as JSON Object",
5
5
  "keywords": [
6
6
  "url",
package/.README.md.un~ DELETED
Binary file
package/.index.js.un~ DELETED
Binary file
package/.package.json.un~ DELETED
Binary file
package/.test.js.un~ DELETED
Binary file
package/test.js DELETED
@@ -1,46 +0,0 @@
1
- // test/index.test.js
2
- import test from "node:test";
3
- import assert from "node:assert/strict";
4
-
5
- import searchParams from "./index.js";
6
-
7
- test("Get URL Params as JSON Object", () => {
8
- const url = "https://example.com?foo=bar&baz=qux";
9
- const result = searchParams(url);
10
- assert.equal(typeof result, "object");
11
- assert.deepStrictEqual({
12
- foo: "bar",
13
- baz: "qux"
14
- }, result);
15
- });
16
-
17
- test("With encoded values", () => {
18
- const url = "https://example.com/?q=hello%20world&lang=en";
19
- const result = searchParams(url);
20
- console.log(result);
21
- assert.equal(typeof result, "object");
22
- assert.deepStrictEqual({
23
- q: "hello world",
24
- lang: "en"
25
- }, result);
26
- });
27
-
28
-
29
- test("Wit Repeated Parameters", () => {
30
- const url = "https://example.com/?tag=js&tag=node&tag=web";
31
- const result = searchParams(url);
32
- console.log(result);
33
- assert.equal(typeof result, "object");
34
- assert.deepStrictEqual({
35
- tag: ["js", "node", "web"]
36
- }, result);
37
- });
38
-
39
- test("Without Parameters", () => {
40
- const url = "https://example.com/";
41
- const result = searchParams(url);
42
- console.log(result);
43
- assert.equal(typeof result, "object");
44
- assert.deepStrictEqual({
45
- }, result);
46
- });