{"_id":"@billdaddy/qskit","_rev":"2-43f99af3ac4edbb29a697a4013e26f97","name":"@billdaddy/qskit","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@billdaddy/qskit","version":"0.1.0","keywords":["query-string","querystring","qs","url","parse","stringify","querystring-parser","array-format","search-params","typescript","zero-dependency"],"author":{"url":"https://github.com/trananhtung","name":"Tung Tran"},"license":"MIT","_id":"@billdaddy/qskit@0.1.0","maintainers":[{"name":"billdaddy","email":"tunganhtran94@gmail.com"}],"homepage":"https://github.com/trananhtung/qskit#readme","bugs":{"url":"https://github.com/trananhtung/qskit/issues"},"dist":{"shasum":"58e1b3c0017dc1015b3dd1cf90d6f437fa61285f","tarball":"https://registry.npmjs.org/@billdaddy/qskit/-/qskit-0.1.0.tgz","fileCount":9,"integrity":"sha512-bHEibxKBPIdj2bY/qGQhZ2feCN8s8FpVzsx0jg+MLygG3yOPBUJumh9yL30NSzjZ8/4fjbl5KxOUhCMp0f7AbA==","signatures":[{"sig":"MEUCIQC2Q9CJ+ziCwUBD18WqBcVsoej6Ajf4JNsRbuCPx0xs/wIgT/XRl8gBhPDgQBq8i7MDhxStJtgYfQRjabvjG6A6mgk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34990},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"45f9c50af5d5fce0572aad6eb53315615d0d9daa","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"billdaddy","email":"tunganhtran94@gmail.com"},"repository":{"url":"git+https://github.com/trananhtung/qskit.git","type":"git"},"_npmVersion":"11.5.2","description":"Tiny, type-safe query string parse and stringify — array formats (bracket/index/comma/repeat) and number/boolean coercion. Zero dependencies.","directories":{},"sideEffects":false,"_nodeVersion":"20.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.17.10"},"_npmOperationalInternal":{"tmp":"tmp/qskit_0.1.0_1782069439229_0.9292089689447778","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@billdaddy/qskit","version":"0.1.1","description":"Tiny, type-safe query string parse and stringify — array formats (bracket/index/comma/repeat) and number/boolean coercion. Zero dependencies.","keywords":["query-string","querystring","qs","url","parse","stringify","querystring-parser","array-format","search-params","typescript","zero-dependency"],"license":"MIT","author":{"name":"Tung Tran","url":"https://github.com/trananhtung"},"homepage":"https://github.com/trananhtung/qskit#readme","repository":{"type":"git","url":"git+https://github.com/trananhtung/qskit.git"},"bugs":{"url":"https://github.com/trananhtung/qskit/issues"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"engines":{"node":">=18"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^20.17.10","tsup":"^8.3.5","typescript":"^5.7.2","vitest":"^2.1.8"},"sideEffects":false,"publishConfig":{"access":"public"},"_id":"@billdaddy/qskit@0.1.1","gitHead":"68c6dbf87bd6d90e1c2ca4cad247fd3c6a072662","_nodeVersion":"20.18.2","_npmVersion":"11.5.2","dist":{"integrity":"sha512-LKWeQzBD4t4/kWdbvP8OdRX6XLzII8fpqWlnCBJa4QHo5A6vsyhGM8ec7quhYn62516WYQt0zHkyoQsDFuQCBw==","shasum":"787e46c5c957b582d12825ab6768ead84ef18933","tarball":"https://registry.npmjs.org/@billdaddy/qskit/-/qskit-0.1.1.tgz","fileCount":9,"unpackedSize":36208,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC0XIoLt6w5ZUIQNGAH14EsGxCU4lHrmjJh+zVJ5KdoFAIgZ7o8ereIRWtu5Bg9mb692/CjATSNTQk5xr3enxA7x7E="}]},"_npmUser":{"name":"billdaddy","email":"tunganhtran94@gmail.com"},"directories":{},"maintainers":[{"name":"billdaddy","email":"tunganhtran94@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/qskit_0.1.1_1782140106067_0.5049782365699393"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T19:17:19.097Z","modified":"2026-06-22T14:55:06.306Z","0.1.0":"2026-06-21T19:17:19.347Z","0.1.1":"2026-06-22T14:55:06.204Z"},"bugs":{"url":"https://github.com/trananhtung/qskit/issues"},"author":{"name":"Tung Tran","url":"https://github.com/trananhtung"},"license":"MIT","homepage":"https://github.com/trananhtung/qskit#readme","keywords":["query-string","querystring","qs","url","parse","stringify","querystring-parser","array-format","search-params","typescript","zero-dependency"],"repository":{"type":"git","url":"git+https://github.com/trananhtung/qskit.git"},"description":"Tiny, type-safe query string parse and stringify — array formats (bracket/index/comma/repeat) and number/boolean coercion. Zero dependencies.","maintainers":[{"name":"billdaddy","email":"tunganhtran94@gmail.com"}],"readme":"# qskit\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\n> Tiny, type-safe **query string** parse & stringify — multiple array formats (bracket / index / comma / repeat) and number/boolean coercion. **Zero dependencies**.\n\n[![CI](https://github.com/trananhtung/qskit/actions/workflows/ci.yml/badge.svg)](https://github.com/trananhtung/qskit/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/@billdaddy/qskit.svg)](https://www.npmjs.com/package/@billdaddy/qskit)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/@billdaddy/qskit)](https://bundlephobia.com/package/@billdaddy/qskit)\n[![types](https://img.shields.io/npm/types/@billdaddy/qskit.svg)](https://www.npmjs.com/package/@billdaddy/qskit)\n[![license](https://img.shields.io/npm/l/@billdaddy/qskit.svg)](./LICENSE)\n\n`URLSearchParams` is fine until you need arrays as `tags[]=a&tags[]=b`, numbers\nthat come back as numbers, or stable sorted output. `qskit` gives you `parse` and\n`stringify` with the array conventions every backend uses and optional type\ncoercion — symmetric, predictable, and **zero-dependency**.\n\n```ts\nimport { parse, stringify } from \"@billdaddy/qskit\";\n\nparse(\"a=1&a=2&page=3\");          // { a: [\"1\", \"2\"], page: \"3\" }\nstringify({ tags: [\"x\", \"y\"] });  // \"tags=x&tags=y\"\n```\n\n## Why qskit?\n\n- **Symmetric `parse` / `stringify`.** The same `arrayFormat` round-trips cleanly.\n- **Every array convention.** `\"none\"` (repeat keys), `\"bracket\"` (`a[]=`),\n  `\"index\"` (`a[0]=`), `\"comma\"` (`a=1,2`).\n- **Optional coercion.** `parseNumbers` and `parseBooleans` turn `\"42\"`/`\"true\"`\n  into `42`/`true`.\n- **Sensible encoding.** Proper percent-encoding, `+` decoded to space, array\n  brackets kept readable.\n- **Null/undefined handling.** `undefined` is dropped; `null` becomes a bare key\n  (or dropped with `skipNull`).\n- **Typed & tiny.** Full types, ESM + CJS, zero dependencies.\n\n## Install\n\n```bash\nnpm install @billdaddy/qskit\n# or: pnpm add @billdaddy/qskit  /  yarn add @billdaddy/qskit  /  bun add @billdaddy/qskit\n```\n\n## `parse(input, options?)`\n\n```ts\nimport { parse } from \"@billdaddy/qskit\";\n\nparse(\"?a=1&b=2\");                 // { a: \"1\", b: \"2\" } (leading ?/# ignored)\nparse(\"a=1&a=2\");                  // { a: [\"1\", \"2\"] }\nparse(\"q=hello+world\");            // { q: \"hello world\" }\n\nparse(\"ids[]=1&ids[]=2\", { arrayFormat: \"bracket\" }); // { ids: [\"1\", \"2\"] }\nparse(\"a[0]=x&a[1]=y\", { arrayFormat: \"index\" });     // { a: [\"x\", \"y\"] }\nparse(\"a=1,2,3\", { arrayFormat: \"comma\" });           // { a: [\"1\", \"2\", \"3\"] }\n\nparse(\"n=42&ok=true\", { parseNumbers: true, parseBooleans: true });\n// { n: 42, ok: true }\n```\n\n```ts\ninterface ParseOptions {\n  arrayFormat?: \"none\" | \"bracket\" | \"index\" | \"comma\"; // default \"none\"\n  parseNumbers?: boolean;   // default false\n  parseBooleans?: boolean;  // default false\n}\n```\n\n## `stringify(object, options?)`\n\n```ts\nimport { stringify } from \"@billdaddy/qskit\";\n\nstringify({ a: 1, b: \"x\", c: true });              // \"a=1&b=x&c=true\"\nstringify({ ids: [1, 2] });                        // \"ids=1&ids=2\"\nstringify({ ids: [1, 2] }, { arrayFormat: \"bracket\" }); // \"ids[]=1&ids[]=2\"\nstringify({ ids: [1, 2] }, { arrayFormat: \"comma\" });   // \"ids=1,2\"\nstringify({ c: 3, a: 1 }, { sort: true });         // \"a=1&c=3\"\nstringify({ a: 1, b: undefined });                 // \"a=1\"\n```\n\n```ts\ninterface StringifyOptions {\n  arrayFormat?: \"none\" | \"bracket\" | \"index\" | \"comma\"; // default \"none\"\n  sort?: boolean;     // default false\n  skipNull?: boolean; // default false (null → bare key)\n}\n```\n\n## Contributors ✨\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome — code, docs, bug reports, ideas, reviews! See the [emoji key](https://allcontributors.org/docs/en/emoji-key) for how each contribution is recognized, and open a PR or issue to get involved.\n\nThanks goes to these wonderful people:\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/trananhtung\"><img src=\"https://avatars.githubusercontent.com/u/30992229?v=4?s=100\" width=\"100px;\" alt=\"Tung Tran\"/><br /><sub><b>Tung Tran</b></sub></a><br /><a href=\"https://github.com/trananhtung/qskit/commits?author=trananhtung\" title=\"Code\">💻</a> <a href=\"#maintenance-trananhtung\" title=\"Maintenance\">🚧</a></td>\n    </tr>\n  </tbody>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\n## License\n\n[MIT](./LICENSE) © Tung Tran\n","readmeFilename":"README.md"}