{"id":15694465,"url":"https://github.com/linusu/node-append-field","last_synced_at":"2025-04-30T13:33:29.851Z","repository":{"id":31424725,"uuid":"34988227","full_name":"LinusU/node-append-field","owner":"LinusU","description":"W3C HTML JSON form compliant field appender","archived":false,"fork":false,"pushed_at":"2022-11-22T02:22:51.000Z","size":9,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T01:51:13.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/LinusU.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":"2015-05-03T14:14:49.000Z","updated_at":"2023-03-10T10:48:03.000Z","dependencies_parsed_at":"2023-01-14T19:01:20.369Z","dependency_job_id":null,"html_url":"https://github.com/LinusU/node-append-field","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-append-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-append-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-append-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-append-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinusU","download_url":"https://codeload.github.com/LinusU/node-append-field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246348197,"owners_count":20762930,"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":[],"created_at":"2024-10-03T18:58:57.163Z","updated_at":"2025-03-31T15:30:18.078Z","avatar_url":"https://github.com/LinusU.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `append-field`\n\nA [W3C HTML JSON forms spec](http://www.w3.org/TR/html-json-forms/) compliant\nfield appender (for lack of a better name). Useful for people implementing\n`application/x-www-form-urlencoded` and `multipart/form-data` parsers.\n\nIt works best on objects created with `Object.create(null)`. Otherwise it might\nconflict with variables from the prototype (e.g. `hasOwnProperty`).\n\n## Installation\n\n```sh\nnpm install --save append-field\n```\n\n## Usage\n\n```javascript\nimport appendField from 'append-field'\n\nconst obj = Object.create(null)\n\nappendField(obj, 'pets[0][species]', 'Dahut')\nappendField(obj, 'pets[0][name]', 'Hypatia')\nappendField(obj, 'pets[1][species]', 'Felis Stultus')\nappendField(obj, 'pets[1][name]', 'Billie')\n\nconsole.log(obj)\n```\n\n```text\n{ pets:\n   [ { species: 'Dahut', name: 'Hypatia' },\n     { species: 'Felis Stultus', name: 'Billie' } ] }\n```\n\n## API\n\n### `appendField(store, key, value)`\n\n- `store` (`object`, required)\n- `key` (`string`, required)\n- `value` (`any`, required)\n\nAdds the field named `key` with the value `value` to the object `store`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fnode-append-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinusu%2Fnode-append-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fnode-append-field/lists"}