Socket
Socket
Sign inDemoInstall

csvjson-csv2json

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.5 to 5.0.6

23

csv2json.js

@@ -64,2 +64,23 @@ (function() {

function uniquify(keys) {
var counts = {};
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (counts[key] === undefined) {
counts[key] = 0;
} else {
counts[key]++;
}
}
var result = [];
for (var i = keys.length-1; i >= 0; i--) {
var key = keys[i];
if (counts[key] > 0) key = key + '__' + counts[key]--;
result.unshift(key);
}
return result;
}
function convert(csv, options) {

@@ -90,2 +111,4 @@ options || (options = {});

keys = uniquify(keys);
var json = options.hash ? {} : [];

@@ -92,0 +115,0 @@ for (var l = 0; l < a.length; l++) {

2

package.json
{
"name": "csvjson-csv2json",
"description": "Converts CSV to JSON. Powers the most used online tool CSVJSON https://www.csvjson.com/csv2json. Used by thousands everyday.",
"version": "5.0.5",
"version": "5.0.6",
"author": "Martin Drapeau <martindrapeau@gmail.com>",

@@ -6,0 +6,0 @@ "contributors": [],

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc