{"_id":"csv-express","_rev":"11-ae371ab8e0f99baebdcb5a3f7d258ecd","name":"csv-express","description":"Adds a CSV response method to expressjs applications.","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.0":{"name":"csv-express","description":"Adds a CSV response method to expressjs applications.","version":"1.0.0","author":{"name":"John J Czaplewski","url":"forked from Seiya Konno"},"contributors":[{"name":"Seiya Konno","url":"nulltask@gmail.com"},{"name":"Matthew Blackshaw","url":"http://mattblackshaw.com"},{"name":"Craig McDonald","url":"http://thrackle.com"}],"devDependencies":{"express":"4.x","mocha":"^2.3.2","should":"^7.1.0","superagent":"^1.4.0"},"keywords":["express","expressjs","csv"],"repository":{"type":"git","url":"git://github.com/jczaplew/csv-express.git"},"main":"index.js","engines":{"node":"0.6 || 0.8 || 0.10 || 0.12 || 4.x"},"scripts":{"test":"mocha","prepublish":"make test"},"gitHead":"54adc85ad0a91cdd822b52f6ca45fde2944e1e34","bugs":{"url":"https://github.com/jczaplew/csv-express/issues"},"homepage":"https://github.com/jczaplew/csv-express","_id":"csv-express@1.0.0","_shasum":"256f70a31ea2689f3209444b909f0351e5ec1ba9","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"jczaplew","email":"jczaplew@gmail.com"},"maintainers":[{"name":"jczaplew","email":"jczaplew@gmail.com"}],"dist":{"shasum":"256f70a31ea2689f3209444b909f0351e5ec1ba9","tarball":"https://registry.npmjs.org/csv-express/-/csv-express-1.0.0.tgz","integrity":"sha512-GMXQOzDPqA4iGDaEO++gPAdKQaf+QnyHSMljnkfxAXWO/Gcz4+ROI2G4QgH5gMb8whCfKu6t0ISxVyUXjLG+DA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF7BAaQmzwGvKX3+MeJVAncY7KQ8zdH1eqmd6rIdUKKAAiEAzIPo3gdlkVCpmV8XAXpD2W9NP3UTozeRcSV//lufNjA="}]},"directories":{}},"1.1.0":{"name":"csv-express","description":"Adds a CSV response method to expressjs applications.","version":"1.1.0","author":{"name":"John J Czaplewski","url":"forked from Seiya Konno"},"contributors":[{"name":"Seiya Konno","url":"nulltask@gmail.com"},{"name":"Matthew Blackshaw","url":"http://mattblackshaw.com"},{"name":"Craig McDonald","url":"http://thrackle.com"},{"name":"Alexey Avramchik","url":"https://github.com/alexcrack"}],"devDependencies":{"express":"4.x","mocha":"^2.3.2","should":"^7.1.0","superagent":"^1.4.0"},"keywords":["express","expressjs","csv"],"repository":{"type":"git","url":"git://github.com/jczaplew/csv-express.git"},"main":"index.js","engines":{"node":"0.6 || 0.8 || 0.10 || 0.12 || 4.x"},"scripts":{"test":"mocha","prepublish":"make test"},"dependencies":{"iconv-lite":"^0.4.13"},"gitHead":"dad533e8e188a24da8dfcb81ca5b70e2e84dd2d3","bugs":{"url":"https://github.com/jczaplew/csv-express/issues"},"homepage":"https://github.com/jczaplew/csv-express","_id":"csv-express@1.1.0","_shasum":"006aa13247c8a5f28a996a1d34277ae00425d261","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.0","_npmUser":{"name":"jczaplew","email":"jczaplew@gmail.com"},"maintainers":[{"name":"jczaplew","email":"jczaplew@gmail.com"}],"dist":{"shasum":"006aa13247c8a5f28a996a1d34277ae00425d261","tarball":"https://registry.npmjs.org/csv-express/-/csv-express-1.1.0.tgz","integrity":"sha512-bHy57RA2lEAbVCJfvp3qsGpUp7ugufJI7JPtG/juLevygaJ3IMe7sIe2CzLaTMQOLWxsjhlMqJwLDF2FBkJquA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD50jc4eH/qcwjvPUhgtiz2HPwoTi7d8v+5rOFUmI1wpAIgbDgUH+hLHGhBvOoo3Tz0ltUE63zik/UkQTm37uYW808="}]},"directories":{}},"1.2.0":{"name":"csv-express","description":"Adds a CSV response method to expressjs applications.","version":"1.2.0","author":{"name":"John J Czaplewski","url":"forked from Seiya Konno"},"contributors":[{"name":"Seiya Konno","url":"nulltask@gmail.com"},{"name":"Matthew Blackshaw","url":"http://mattblackshaw.com"},{"name":"Craig McDonald","url":"http://thrackle.com"},{"name":"Alexey Avramchik","url":"https://github.com/alexcrack"}],"devDependencies":{"express":"4.x","mocha":"^2.3.2","should":"^7.1.0","superagent":"^1.4.0"},"keywords":["express","expressjs","csv"],"repository":{"type":"git","url":"git://github.com/jczaplew/csv-express.git"},"main":"index.js","engines":{"node":"0.6 || 0.8 || 0.10 || 0.12 || 4.x"},"scripts":{"test-express-2":"npm install express@2.x && mocha test/2","test-express-3":"npm install express@3.x && mocha test/3+","test-express-4":"npm install express@4.x && mocha test/3+","test":"npm run test-express-2 && npm run test-express-3 && npm run test-express-4","prepublish":"make test"},"dependencies":{"iconv-lite":"^0.4.13"},"gitHead":"691af6ac181fd2d8012e524970c16c2cec700f4d","bugs":{"url":"https://github.com/jczaplew/csv-express/issues"},"homepage":"https://github.com/jczaplew/csv-express#readme","_id":"csv-express@1.2.0","_shasum":"e2924650c26a8d6a60c2663e2d4e1b50ba7833b4","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"jczaplew","email":"jczaplew@gmail.com"},"maintainers":[{"name":"jczaplew","email":"jczaplew@gmail.com"}],"dist":{"shasum":"e2924650c26a8d6a60c2663e2d4e1b50ba7833b4","tarball":"https://registry.npmjs.org/csv-express/-/csv-express-1.2.0.tgz","integrity":"sha512-WX6mxGsktE8QByihplSHqcFGMSWP9hmK23d0W3BTiNwlpnXLW0rGnEKWjmFjWcDFYsBypwQCvTvsBWXFXIFwJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqqPY7F1WwjO7gW9WrxIAwrk8vQp7daHjZHAP4ef8qpAIgYzmwSDcY9lrwONwxE6Yh519FKXckfPy9Ts0IOGjh3WI="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/csv-express-1.2.0.tgz_1487954543490_0.3951414190232754"},"directories":{}},"1.2.1":{"name":"csv-express","description":"Adds a CSV response method to expressjs applications.","version":"1.2.1","author":{"name":"John J Czaplewski","url":"forked from Seiya Konno"},"contributors":[{"name":"Seiya Konno","url":"nulltask@gmail.com"},{"name":"Matthew Blackshaw","url":"http://mattblackshaw.com"},{"name":"Craig McDonald","url":"http://thrackle.com"},{"name":"Alexey Avramchik","url":"https://github.com/alexcrack"}],"devDependencies":{"express":"4.x","mocha":"^2.3.2","should":"^7.1.0","superagent":"^1.4.0"},"keywords":["express","expressjs","csv"],"repository":{"type":"git","url":"git://github.com/jczaplew/csv-express.git"},"main":"index.js","engines":{"node":"0.6 || 0.8 || 0.10 || 0.12 || 4.x"},"scripts":{"test-express-2":"npm install express@2.x && mocha test/2","test-express-3":"npm install express@3.x && mocha test/3+","test-express-4":"npm install express@4.x && mocha test/3+","test":"npm run test-express-2 && npm run test-express-3 && npm run test-express-4","prepublish":"make test"},"dependencies":{"iconv-lite":"^0.4.13"},"gitHead":"efc8a228d45827cfe9ffcfb0296009a90269301d","bugs":{"url":"https://github.com/jczaplew/csv-express/issues"},"homepage":"https://github.com/jczaplew/csv-express#readme","_id":"csv-express@1.2.1","_shasum":"0bdaf887c36bfa0ab7b4e42c50d6cc4f9bac38d5","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"jczaplew","email":"jczaplew@gmail.com"},"maintainers":[{"name":"jczaplew","email":"jczaplew@gmail.com"}],"dist":{"shasum":"0bdaf887c36bfa0ab7b4e42c50d6cc4f9bac38d5","tarball":"https://registry.npmjs.org/csv-express/-/csv-express-1.2.1.tgz","integrity":"sha512-qYMbAfzmZzYhec4iyuVS+OUcpHCGXHSapbggrrsREuzkgUoPoeFpDN3bSBG5/9wHCtPbVLWbwfDzcqZJHM8Mhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6mVpXODtrKGe+LXJsBibCUBJF3BFFIgNULF0ymHLblQIgXNbScMbiXozfKUvX6ck6MfJH9fg5WoBaFSD4Ho9NrKY="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/csv-express-1.2.1.tgz_1490717315904_0.37219606526196003"},"directories":{}},"1.2.2":{"name":"csv-express","description":"Adds a CSV response method to expressjs applications.","version":"1.2.2","author":{"name":"John J Czaplewski","url":"forked from Seiya Konno"},"contributors":[{"name":"Seiya Konno","url":"nulltask@gmail.com"},{"name":"Matthew Blackshaw","url":"http://mattblackshaw.com"},{"name":"Craig McDonald","url":"http://thrackle.com"},{"name":"Alexey Avramchik","url":"https://github.com/alexcrack"}],"devDependencies":{"express":"4.x","mocha":"^2.3.2","should":"^7.1.0","superagent":"^1.4.0"},"keywords":["express","expressjs","csv"],"repository":{"type":"git","url":"git://github.com/jczaplew/csv-express.git"},"main":"index.js","engines":{"node":"0.6 || 0.8 || 0.10 || 0.12 || 4.x"},"scripts":{"test-express-2":"npm install express@2.x && mocha test/2","test-express-3":"npm install express@3.x && mocha test/3+","test-express-4":"npm install express@4.x && mocha test/3+","test":"npm run test-express-2 && npm run test-express-3 && npm run test-express-4","prepublish":"make test"},"dependencies":{"iconv-lite":"^0.4.13"},"gitHead":"c3e7bb692347866e14d6cbd66fe5e9575015f654","bugs":{"url":"https://github.com/jczaplew/csv-express/issues"},"homepage":"https://github.com/jczaplew/csv-express#readme","_id":"csv-express@1.2.2","_shasum":"84fc16420ee5a324e1e66e15fca28fbdb9a5cf64","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"jczaplew","email":"jczaplew@gmail.com"},"dist":{"shasum":"84fc16420ee5a324e1e66e15fca28fbdb9a5cf64","tarball":"https://registry.npmjs.org/csv-express/-/csv-express-1.2.2.tgz","integrity":"sha512-8wdnFKROS+oIG3BAE6lyNZfJPVHWr22Ftr14jj98Pu0rkg82urWCLy34ELpZ6xDHX9nAqmfBB1nvrVupjAYMvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyecqLHlcq/Xem3YIE/JN5E1XWSJveO59qxy6lhrXlwAIhALBWJzi5JuE8HdqS69nSMFLOgylhRhp3I53DQnxeqTWi"}]},"maintainers":[{"name":"jczaplew","email":"jczaplew@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/csv-express-1.2.2.tgz_1501076416350_0.7531869050581008"},"directories":{}}},"readme":"# csv-express\n\nA CSV response module for [Express](http://expressjs.com/). This is an up-to-date fork of [express-csv](https://github.com/nulltask/express-csv) that merges outstanding pull requests.\n\n\n## Changes from [express-csv](https://github.com/nulltask/express-csv)\n+ Adds support for adding a header row to the CSV ([#16](https://github.com/nulltask/express-csv/pull/16))\n+ Better escaping of numbers so that applications such as Excel properly recognize data types\n+ Actively maintained for use Express 3 and 4\n+ Up to date dependencies and tests\n+ Support for different encodings ( [thanks alexcrack!](https://github.com/jczaplew/csv-express/pull/1) )\n\n\n## Installation\n\n````bash\nnpm install csv-express\n````\n\n## API\n### Methods\n\n#### res.csv(data [, csvHeaders] [, responseHeaders] [, statusCode])\n\n+ data (**required**): an array of arrays or objects\n+ csvHeaders (*optional*): a Boolean for returning headers on the output CSV file. Default is `false`.\n+ responseHeaders (*optional*): object containing custom HTTP response headers\n+ statusCode (*optional*): a custom HTTP response status code. Default is 200.\n\n### Settings\n#### #separator\nThe delimiter to use, default is `','`.\n\n#### #preventCast\nPrevent Excels type casting, default is `false`.\n\n#### #ignoreNullOrUndefined\nTreat `null` and `undefined` values as empty strings in the output, default is `true`.\n\n## Usage\n\nExample:\n\n````javascript\nvar express = require('express')\nvar csv = require('csv-express')\nvar app = express()\n\n// Basic\napp.get('/', function(req, res) {\n  res.csv([\n    [\"a\", \"b\", \"c\"]\n  , [\"d\", \"e\", \"f\"]\n  ])\n})\n\n// Add headers\napp.get('/headers', function(req, res) {\n  res.csv([\n    {\"a\": 1, \"b\": 2, \"c\": 3},\n    {\"a\": 4, \"b\": 5, \"c\": 6}\n  ], true)\n})\n\n// Add response headers and status code (will throw a 500 error code)\napp.get('/all-params', function(req, res) {\n  res.csv([\n    {\"a\": 1, \"b\": 2, \"c\": 3},\n    {\"a\": 4, \"b\": 5, \"c\": 6}\n  ], true, {\n    \"Access-Control-Allow-Origin\": \"*\"\n  }, 500)\n})\n\napp.listen(3000)\n````\n\nYou can also pass an array of objects and optionally return a header row.\nUseful when working with the results from database queries using [node-mysql](https://github.com/felixge/node-mysql/) or [node-postgres](https://github.com/brianc/node-postgres).\n\n````javascript\n  res.csv([\n      {\"name\": \"Sam\", \"age\": 1},\n      {\"name\": \"Mary\": \"age\": 2}\n  ], true)\n\n  => name, age\n     Sam, 1\n     Mary, 2\n````\n\n\n\n## License\nThe original license is as follows:\n\n    The MIT License\n\n    Copyright (c) 2012 Seiya Konno <nulltask@gmail.com>\n\n    Permission is hereby granted, free of charge, to any person obtaining\n    a copy of this software and associated documentation files (the\n    'Software'), to deal in the Software without restriction, including\n    without limitation the rights to use, copy, modify, merge, publish,\n    distribute, sublicense, and/or sell copies of the Software, and to\n    permit persons to whom the Software is furnished to do so, subject to\n    the following conditions:\n\n    The above copyright notice and this permission notice shall be\n    included in all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nAll modifications from the original are CC0.\n\n## Support\nDevelopment supported by NSF CAREER EAR-1150082 and NSF ICER-1440312\n","maintainers":[{"name":"jczaplew","email":"jczaplew@gmail.com"}],"time":{"modified":"2022-06-14T05:15:36.850Z","created":"2015-09-18T16:40:14.624Z","1.0.0":"2015-09-18T16:40:14.624Z","1.1.0":"2015-10-16T14:06:34.032Z","1.2.0":"2017-02-24T16:42:25.482Z","1.2.1":"2017-03-28T16:08:38.045Z","1.2.2":"2017-07-26T13:40:17.380Z"},"homepage":"https://github.com/jczaplew/csv-express#readme","keywords":["express","expressjs","csv"],"repository":{"type":"git","url":"git://github.com/jczaplew/csv-express.git"},"contributors":[{"name":"Seiya Konno","url":"nulltask@gmail.com"},{"name":"Matthew Blackshaw","url":"http://mattblackshaw.com"},{"name":"Craig McDonald","url":"http://thrackle.com"},{"name":"Alexey Avramchik","url":"https://github.com/alexcrack"}],"author":{"name":"John J Czaplewski","url":"forked from Seiya Konno"},"bugs":{"url":"https://github.com/jczaplew/csv-express/issues"},"readmeFilename":"Readme.md","users":{"ekmpls":true,"hellovictor":true,"ivan.marquez":true,"duda.sertorio":true}}