Socket
Socket
Sign inDemoInstall

json-2-csv

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-2-csv - npm Package Compare versions

Comparing version 3.15.1 to 3.16.0

2

lib/converter.d.ts

@@ -88,3 +88,3 @@ export interface ISharedOptions {

*/
sortHeader?: boolean;
sortHeader?: boolean|((a: any, b: any) => number);

@@ -91,0 +91,0 @@ /**

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

if (options.sortHeader) {
return fieldNames.sort();
return typeof options.sortHeader === 'function' ? fieldNames.sort(options.sortHeader) : fieldNames.sort();
}

@@ -109,0 +109,0 @@ return fieldNames;

@@ -8,3 +8,3 @@ {

"description": "A JSON to CSV and CSV to JSON converter that natively supports sub-documents and auto-generates the CSV heading.",
"version": "3.15.1",
"version": "3.16.0",
"homepage": "https://mrodrig.github.io/json-2-csv",

@@ -11,0 +11,0 @@ "repository": {

@@ -99,3 +99,3 @@ # json-2-csv

* Default: `true`
* `sortHeader` - Boolean - Should the header keys be sorted in alphabetical order?
* `sortHeader` - Boolean or Function - Should the header keys be sorted in alphabetical order? or pass a function to use a custom sorting function
* Default: `false`

@@ -102,0 +102,0 @@ * `trimFieldValues` - Boolean - Should the field values be trimmed?

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