hapi-csv
Advanced tools
Comparing version 5.0.0 to 5.0.1
The MIT License (MIT) | ||
Copyright (c) 2018 Salesflare | ||
Copyright (c) 2020 Salesflare | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
{ | ||
"name": "hapi-csv", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Hapi plugin for converting a Joi response schema and dataset to csv", | ||
@@ -26,19 +26,19 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@hapi/hoek": "^9.0.2", | ||
"exceljs": "^3.6.1", | ||
"fast-csv": "^4.0.2", | ||
"xlsx": "^0.15.4" | ||
"@hapi/hoek": "^9.0.4", | ||
"exceljs": "^3.8.1", | ||
"fast-csv": "^4.1.3", | ||
"xlsx": "^0.15.6" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "^8.0.1", | ||
"@hapi/joi": "^17.1.0", | ||
"@hapi/lab": "^22.0.3", | ||
"@hapi/hapi": "^19.0.5" | ||
"@hapi/joi": "^17.1.1", | ||
"@hapi/lab": "^22.0.4", | ||
"@hapi/hapi": "^19.1.1" | ||
}, | ||
"peerDependencies": { | ||
"@hapi/hapi": ">=19.0.5", | ||
"@hapi/joi": ">=17.1.0" | ||
"@hapi/hapi": ">=19.1.1", | ||
"@hapi/joi": ">=17.1.1" | ||
}, | ||
"engines": { | ||
"node": ">=12.14.0" | ||
"node": ">=12.16.1" | ||
}, | ||
@@ -45,0 +45,0 @@ "bugs": { |
@@ -6,3 +6,3 @@ # hapi-csv [![Build Status](https://travis-ci.org/Salesflare/hapi-csv.svg?branch=master)](https://travis-ci.org/Salesflare/hapi-csv) | ||
Converts the response to csv based on the Joi response schema when the Accept header includes `text/csv` or `application/csv` or the requested route ends with `.csv`. | ||
Converts the response to xlsx (Excel) when the Accept header includes `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` or the requested route ends with `.xlsx`. | ||
Converts the response to xlsx (Excel) with the `enableExcel` option when the Accept header includes `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` or the requested route ends with `.xlsx`. | ||
@@ -79,3 +79,3 @@ ## How | ||
Hapi-csv supports dynamic response schemas as well. | ||
hapi-csv supports dynamic response schemas as well. | ||
Imagine one of your property's schema is dynamic but you still want to export the value of it to csv. | ||
@@ -150,3 +150,4 @@ You can tell hapi-csv to translate a given key on the fly when it is converting the response to csv (`onPreResponse`). | ||
You can also enable Excel conversion: | ||
You can also enable Excel conversion. | ||
It will convert the response to xlsx (Excel) when the Accept header includes `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` or the requested route ends with `.xlsx`. | ||
@@ -153,0 +154,0 @@ ```javascript |
50797
162
Updated@hapi/hoek@^9.0.4
Updatedexceljs@^3.8.1
Updatedfast-csv@^4.1.3
Updatedxlsx@^0.15.6