{"name":"append-field","version":"1.0.0","license":"MIT","author":{"name":"Linus Unnebäck","email":"linus@folkdatorn.se"},"main":"index.js","devDependencies":{"mocha":"^2.2.4","standard":"^6.0.5","testdata-w3c-json-form":"^0.2.0"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+ssh://git@github.com/LinusU/node-append-field.git"},"gitHead":"4e103efe352cfcb072366e3f43aa355c0932bace","description":"A [W3C HTML JSON forms spec](http://www.w3.org/TR/html-json-forms/) compliant field appender (for lack of a better name). Useful for people implementing `application/x-www-form-urlencoded` and `multipart/form-data` parsers.","bugs":{"url":"https://github.com/LinusU/node-append-field/issues"},"homepage":"https://github.com/LinusU/node-append-field#readme","_id":"append-field@1.0.0","_shasum":"1e3440e915f0b1203d23748e78edd7b9b5b43e56","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.5.0","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"dist":{"shasum":"1e3440e915f0b1203d23748e78edd7b9b5b43e56","tarball":"http://registry-npm.ywwl.com/append-field/download/append-field-1.0.0.tgz","integrity":"sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZeBYB3RMurzQNTqi3uh7fq/E+CGZn/jkeGTlujpuiIwIhAImbaab0j0wxRcE4J6wu6eLlt2uzAUJHt+338glH3DP+"}],"size":2768,"noattachment":false,"key":"/append-field/-/append-field-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/append-field-1.0.0.tgz_1455461274302_0.4959568399935961"},"directories":{},"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","publish_time":1455461276413,"_cnpm_publish_time":1455461276413,"dist-tags":{"latest":"2.0.0"}}