Socket
Socket
Sign inDemoInstall

hapi-csv

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-csv - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

2

lib/index.js

@@ -40,3 +40,3 @@ 'use strict';

request.setUrl(path.substring(0, path.length - 4));
request.setUrl(`${path.substring(0, path.length - 4)}${request.url.search}`);
request.headers.accept = 'text/csv';

@@ -43,0 +43,0 @@ }

{
"name": "hapi-csv",
"version": "2.3.0",
"version": "2.3.1",
"description": "Hapi plugin for converting a Joi response schema and dataset to csv",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -148,2 +148,17 @@ 'use strict';

it('Converts when route ends with .csv and has query params', (done) => {
return simpleServer.inject({
method: 'GET',
url: '/user.csv?q=1'
}, (res) => {
expect(res.result).to.equal(userCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.request.url.path).to.equal('/user?q=1');
return done();
});
});
it('Still replies with JSON when asked', (done) => {

@@ -150,0 +165,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc