Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hapi-csv

Package Overview
Dependencies
Maintainers
3
Versions
42
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 4.0.0 to 4.0.1

7

lib/index.js

@@ -91,7 +91,4 @@ 'use strict';

// FUTURE add header=present but wait for response on https://github.com/hapijs/hapi/issues/3243
// var response = reply(csv);
// response.type(`${preferredType}; charset=${response.settings.charset}; header=present;`);
return reply(csv).type(preferredType).header('content-disposition', 'attachment;');
const response = reply(csv);
return response.type(`${preferredType}; charset=${response.settings.charset}; header=present;`).header('content-disposition', 'attachment;');
});

@@ -98,0 +95,0 @@ });

The MIT License (MIT)
Copyright (c) 2015 Salesflare
Copyright (c) 2018 Salesflare

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

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

@@ -23,3 +23,3 @@ "main": "lib/index.js",

"dependencies": {
"async": "^2.6.0",
"async": "^2.6.1",
"hoek": "5.x.x"

@@ -26,0 +26,0 @@ },

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

expect(res.result).to.equal(userCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -159,3 +159,3 @@

expect(res.result).to.equal(userCSV);
expect(res.headers['content-type']).to.equal('application/csv');
expect(res.headers['content-type']).to.equal('application/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -175,3 +175,3 @@

expect(res.result).to.equal(userCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -191,3 +191,3 @@

expect(res.result).to.equal(userCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -300,3 +300,3 @@ expect(res.request.url.path).to.equal('/user?q=1');

expect(res.result).to.equal(postUserCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -392,3 +392,3 @@

expect(res.result).to.equal(expectedResult);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -438,3 +438,3 @@

expect(res.result).to.equal(5);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -484,3 +484,3 @@

expect(res.result).to.equal('I said: ""Hello""');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -553,3 +553,3 @@

expect(res.result, 'result').to.equal(userCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -631,3 +631,3 @@

expect(res.result, 'result').to.equal(userCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -774,3 +774,3 @@

expect(res.result, 'result').to.equal(userCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -843,3 +843,3 @@

expect(res.result, 'result').to.equal(userCSV);
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8');
expect(res.headers['content-type']).to.equal('text/csv; charset=utf-8; header=present;');
expect(res.headers['content-disposition']).to.equal('attachment;');

@@ -846,0 +846,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