Socket
Socket
Sign inDemoInstall

text2json

Package Overview
Dependencies
3
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.2.1

3

lib/index.js

@@ -199,2 +199,5 @@ "use strict";

var _hash = {};
if (!this.columnFilters) {
return _hash;
}
for (var i = 0; i < this.columnFilters.length; i++) {

@@ -201,0 +204,0 @@ _hash[headers[this.columnFilters[i]]] = line[this.columnFilters[i]];

2

package.json
{
"name": "text2json",
"version": "2.2.0",
"version": "2.2.1",
"description": "Performant parser for textual data (CSV parser)",

@@ -5,0 +5,0 @@ "keywords": [

@@ -227,2 +227,5 @@ import * as debug from 'debug'

let _hash = {}
if (!this.columnFilters) {
return _hash
}
for (var i = 0; i < this.columnFilters.length; i++) {

@@ -229,0 +232,0 @@ _hash[headers[this.columnFilters[i]]] = line[this.columnFilters[i]]

@@ -197,3 +197,3 @@ import {ParserOptions, Parser} from '../src/index.js'

it.only('ascii', (done) => {
it('ascii', (done) => {
let opt : ParserOptions = {hasHeader: true, encoding: 'ascii'}

@@ -203,6 +203,6 @@ let sub = new Parser(opt)

1,2,3
97,98,99`
let expected = [ { a: '1', b: '2', c: '3' }, { a: '4', b: '5', c: 'J$' } ]
4,5,ʤ`
let expected = [ { a: '1', b: '2', c: '3' }, { a: '4', b: '5', c: 'ʤ' } ]
sub.text2json(testItem, (err, actual)=>{
if(!_.isEqual(expected, actual)) {
if(_.isEqual(expected, actual)) {
logTestData(expected, actual)

@@ -209,0 +209,0 @@ done (`Failed test for wrong_encoding`)

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