{"_id":"@cprzytocki/export-to-csv","_rev":"1-5a4c04fbd379dca76ef065084553f82b","name":"@cprzytocki/export-to-csv","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.1":{"name":"@cprzytocki/export-to-csv","version":"0.2.1","description":"Easily create CSV data from json collection","repository":{"type":"git","url":"git+https://github.com/alexcaza/export-to-csv.git"},"scripts":{"dev":"tsc --watch","test":"tsc && karma start","prepublishOnly":"tsc"},"keywords":["export-to-csv","export-to-excel","csv","excel","libreoffice","openoffice","angular2","typescript","react","ngx","angular4","angular5"],"author":{"name":"alexcaza"},"email":"alex@alexcaza.com","license":"MIT","bugs":{"url":"https://github.com/alexcaza/export-to-csv/issues"},"main":"./build/index.js","types":"./build/export-to-csv.d.ts","homepage":"https://github.com/alexcaza/export-to-csv#readme","devDependencies":{"@types/jasmine":"^2.8.3","es6-shim":"^0.35.3","jasmine-core":"^2.4.1","karma":"^1.5.0","karma-chrome-launcher":"^2.0.0","karma-jasmine":"^1.0.2","karma-phantomjs-launcher":"^1.0.4","karma-sourcemap-loader":"^0.3.7","karma-typescript":"^3.0.8","typescript":"^2.8.4"},"gitHead":"8baa656209bfeff14627819e4fc32ffbeb7157bb","_id":"@cprzytocki/export-to-csv@0.2.1","_nodeVersion":"14.16.1","_npmVersion":"7.11.2","dist":{"integrity":"sha512-gSDp/f24hgc+b3HW8ZYMkODg+fnSI36hV5i5rJEkUKugnI7aUIm59j5nubEEfMv96GGMN92wiK8GCZNsBXGOPw==","shasum":"510929c060adcf4869dc668d8268de1421798458","tarball":"https://registry.npmjs.org/@cprzytocki/export-to-csv/-/export-to-csv-0.2.1.tgz","fileCount":7,"unpackedSize":15724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+awECRA9TVsSAnZWagAAuBwP/2dRrShBEbyLgau844Aa\nEGcC1h/WiS0WCM6AZaNCvyEhmdd2ttVq6sLXwLqtlU6vhp5K8KB5MJEM49kV\nlSNQCDR1JUtgQ5DupzR2uyO4/Q5wQldXc2kV6sCf5pk6BbiKTRriU5hNy9mb\nmkSYRAD/yZeNIQShImKKnKBjhyY6/PUbhenLMnQk7ArspsRNYRKLVXuGBiFF\nr1eaXvomk06Bikuuce+zirChhgwilyums4NZ7E+uOFijlT3ibe45AsKVfFfO\nfwIEGtgmRucl6s1QQEaxIQb+EAaIOjo6Drjaooe4i9R8YW6yvveoR1bvPa1A\ndLN/3fJVAai3LQPzMjCXqS+nVEbvHaMlw78QF1pPP9S5lZXAcyHMR1k3nSGp\nu+40SC6s6zm+micVHvVQhf4zi54RcqdVqox2ZpviVWGI5uCr2nKcXP3AZ7Nx\nwvprqDXRMxdWHkzOoRWV8wuslzy+SrI0lBfWqKR5cetfYb1Tu0nBifR8yAYn\nrQXJtVQwD8Uxqek2H9jNdxHS+sb0KP0hUlyQZ7vLPNYQBDeSN7ggmD2IDrXx\nvHnsrds6qU0nTh0sUO53sVK8QNJpCSYK0rtErIVlmV4nYRhFAjBcxyzKJic/\nkwD5wTMtMRKXRb3/IBTmNagGR0mQyCd9VARIwVeUhrl2VM9PAIY0QdHNdcLd\nko3r\r\n=uQSj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDewuQE0CH9JXWegIBYIU3Iw3GuZf2852PIVmUZiyVVkAIgG4xvbf2WZr/Dc44bwG/8CuhuwPMgUoAfoaqX1h+CBrE="}]},"_npmUser":{"name":"cprzytocki","email":"cprzytocki@gmail.com"},"directories":{},"maintainers":[{"name":"cprzytocki","email":"cprzytocki@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/export-to-csv_0.2.1_1626975235880_0.9537715727695435"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-22T17:33:55.838Z","0.2.1":"2021-07-22T17:33:56.026Z","modified":"2022-04-05T01:33:32.004Z"},"maintainers":[{"name":"cprzytocki","email":"cprzytocki@gmail.com"}],"description":"Easily create CSV data from json collection","homepage":"https://github.com/alexcaza/export-to-csv#readme","keywords":["export-to-csv","export-to-excel","csv","excel","libreoffice","openoffice","angular2","typescript","react","ngx","angular4","angular5"],"repository":{"type":"git","url":"git+https://github.com/alexcaza/export-to-csv.git"},"author":{"name":"alexcaza"},"bugs":{"url":"https://github.com/alexcaza/export-to-csv/issues"},"license":"MIT","readme":"# export-to-csv | Export to CSV Mini Library\nBased off of [this library](https://github.com/javiertelioz/angular2-csv) by Javier Telio\n\n> Helper library to quickly and easily create a CSV file in browser or Node\n> \n\n## Installation\n\n```javascript\nyarn add export-to-csv\n// npm install --save export-to-csv\n```\n\n## Usage\n```javascript\n\nimport { ExportToCsv } from 'export-to-csv';\n\nvar data = [\n  {\n    name: 'Test 1',\n    age: 13,\n    average: 8.2,\n    approved: true,\n    description: \"using 'Content here, content here' \"\n  },\n  {\n    name: 'Test 2',\n    age: 11,\n    average: 8.2,\n    approved: true,\n    description: \"using 'Content here, content here' \"\n  },\n  {\n    name: 'Test 4',\n    age: 10,\n    average: 8.2,\n    approved: true,\n    description: \"using 'Content here, content here' \"\n  },\n];\n\n  const options = { \n    fieldSeparator: ',',\n    quoteStrings: '\"',\n    decimalSeparator: '.',\n    showLabels: true, \n    showTitle: true,\n    title: 'My Awesome CSV',\n    useTextFile: false,\n    useBom: true,\n    useKeysAsHeaders: true,\n    // headers: ['Column 1', 'Column 2', etc...] <-- Won't work with useKeysAsHeaders present!\n  };\n\nconst csvExporter = new ExportToCsv(options);\n\ncsvExporter.generateCsv(data);\n\n```\n\n## API\n\n\n| Option        | Default           | Description  |\n| :------------- |:-------------:| -----|\n| **fieldSeparator**      | , | Defines the field separator character |\n| **filename**      | 'generated' | Sets the name of the downloaded file. \".csv\" will be appended to the value provided. |\n| **quoteStrings**      | \"      | If provided, will use this characters to \"escape\" fields, otherwise will use double quotes as deafult |\n| **decimalSeparator** | .      | Defines the decimal separator character (default is .). If set to \"locale\", it uses the [language sensitive representation of the number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString).|\n| **showLabels** | false      | If true, the first row will be the `headers` option or object keys if `useKeysAsHeaders` is present|\n| **showTitle** | false      | Includes the title as the first line in the generated file   |\n| **title** | 'My Generated Report' | This string will be used as the report title |\n| **useBom** | true      | If true, adds a BOM character at the start of the CSV to improve file compatibility |\n| **useTextFile** | false      | If true, returns a `.txt` file instead of `.csv` |\n| **useKeysAsHeaders** | false      | If true, this will use the keys of the first object in the collection as the column headers|\n| **headers** | []      | Expects an array of strings, which if supplied, will be used as the column headers|\n\n\n# Thanks!\n\n|        Credits and Original Authors        |\n| :------------- |\n| **[javiertelioz](https://github.com/javiertelioz)** |\n| **[sn123](https://github.com/sn123)** |\n| **[arf1980](https://github.com/arf1980)** |\n","readmeFilename":"README.md"}