csv-to-js-parser
Advanced tools
Comparing version 1.1.1 to 1.1.2
30
app.js
@@ -0,5 +1,26 @@ | ||
/* | ||
The MIT License (MIT) | ||
Copyright (c) Aleksandr Meniailo (Александр Меняйло), Mendeo 2020 (deorathemen@gmail.com) | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
*/ | ||
'use strict'; | ||
//const fs = require('fs'); | ||
//let data = fs.readFileSync(__dirname + '\\tests\\data_unsort.csv').toString(); | ||
module.exports.csvToObj = function(data, delimeter, description, isSorted) | ||
@@ -93,3 +114,2 @@ { | ||
//Converting to obj | ||
while(flag) | ||
@@ -222,3 +242,3 @@ { | ||
let val = elem[keys[j]][i]; | ||
if (val !== null) out += val.toString(); | ||
if (val !== null) out += val.toString(); | ||
} | ||
@@ -225,0 +245,0 @@ if (j !== keys.length - 1) out += delimeter; |
{ | ||
"name": "csv-to-js-parser", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Converting csv data into array of JavaScript objects. Can be used for relation format input tables.", | ||
@@ -5,0 +5,0 @@ "main": "app.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31580
611