{"id":20962972,"url":"https://github.com/doesdev/tiny-params","last_synced_at":"2025-05-14T08:34:36.459Z","repository":{"id":57377251,"uuid":"83155614","full_name":"doesdev/tiny-params","owner":"doesdev","description":"A tiny URL param parser, suitable for server or browser","archived":false,"fork":false,"pushed_at":"2020-03-13T23:04:59.000Z","size":108,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T05:09:49.613Z","etag":null,"topics":["parameters","querystrings","url-parser"],"latest_commit_sha":null,"homepage":"http://tiny-params.doesdev.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doesdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-25T19:11:12.000Z","updated_at":"2023-09-08T17:21:29.000Z","dependencies_parsed_at":"2022-09-26T16:41:44.590Z","dependency_job_id":null,"html_url":"https://github.com/doesdev/tiny-params","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doesdev%2Ftiny-params","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doesdev%2Ftiny-params/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doesdev%2Ftiny-params/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doesdev%2Ftiny-params/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doesdev","download_url":"https://codeload.github.com/doesdev/tiny-params/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254105128,"owners_count":22015596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parameters","querystrings","url-parser"],"created_at":"2024-11-19T02:39:39.671Z","updated_at":"2025-05-14T08:34:36.190Z","avatar_url":"https://github.com/doesdev.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"tiny-params.png\" alt=\"SCRUD\" /\u003e\u003cbr /\u003e\n  \u003ca href=\"https://npmjs.org/package/tiny-params\"\u003e\n    \u003cimg src=\"https://badge.fury.io/js/tiny-params.svg\" alt=\"NPM version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/feross/standard\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat\" alt=\"js-standard-style\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n# tiny-params\n\n\u003e A tiny URL param parser, suitable for server or browser\n\n## highlights\n- it's tiny (\u003c 25 sloc)\n- it's highly browser compatible (IE6 and everything else)\n- it ships with both ES6 and CommonJS modules\n- it makes repeated keys an array `?a=1\u0026a=2` -\u003e `{ a: [1, 2] }`\n- it handles explicit arrays `?a[]=1` -\u003e `{ a: [1] }`\n- it handles flags (key with no value) `?a=b\u0026flag` -\u003e `{ a: 'b', flag: true }`\n- it decodes `encodeURIComponent` encoded items\n- it converts booleans and numbers from strings\n- it converts the values `'null'` and `'undefined'` to `null`\n- it respects the hash (as per [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3.4))\n- it's competitively fast (not the fastest, not far from it)\n\n## lowlights\n- it looks like code golf, kind of is\n- it uses `decodeURIComponent` (sparingly) which is slow (but highly compatible)\n\n## install\n\n```sh\n$ npm install --save tiny-params\n```\n\n## usage\n\n```js\nconst tinyParams = require('tiny-params')\nconst url = 'http://localhost:80/base/res?name=andrew\u0026zip=37615\u0026zip=37601'\nconst params = tinyParams(url)\n// params === { name: 'andrew', zip: [37615, 37601] }\n```\n\n## License\n\nMIT © [Andrew Carpenter](https://github.com/doesdev)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoesdev%2Ftiny-params","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoesdev%2Ftiny-params","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoesdev%2Ftiny-params/lists"}