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.1 to 2.2.2

.coveralls.yml

12

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

@@ -20,5 +20,8 @@ "keywords": [

"test": "DEBUG=TP* mocha dist/test/spectrum-tests.js",
"perf": "DEBUG=TP* npm run build && mocha dist/test/performance-tests.js",
"release": "gulp release",
"gentestdata": "node dist/test/genTestData.js",
"debug": "npm run build && DEBUG=TP* node test/debug.js"
"debug": "npm run build && DEBUG=TP* node test/debug.js",
"cover": "istanbul cover _mocha dist/test/spectrum-tests.js",
"coveralls": "istanbul cover _mocha dist/test/spectrum-tests.js --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},

@@ -39,3 +42,6 @@ "repository": {

"@types/underscore": "^1.7.36",
"babel-preset-es2015": "^6.18.0",
"babel-register": "^6.18.0",
"chai": "^3.5.0",
"coveralls": "^2.11.15",
"faker": "^3.1.0",

@@ -48,3 +54,5 @@ "gulp": "^3.9.1",

"gulp-uglify": "^2.0.0",
"istanbul": "^0.4.5",
"mocha": "^3.2.0",
"mocha-lcov-reporter": "^1.2.0",
"readline": "^1.3.0",

@@ -51,0 +59,0 @@ "standard": "^8.6.0",

@@ -5,2 +5,3 @@ text2json

[![npm](http://img.shields.io/npm/v/text2json.svg)](https://www.npmjs.com/package/text2json)
[![Coverage Status](https://coveralls.io/repos/github/nilobarp/text2json/badge.svg?branch=master)](https://coveralls.io/github/nilobarp/text2json?branch=master)

@@ -7,0 +8,0 @@ Performant parser for textual data

25

test/spectrum-tests.ts

@@ -414,27 +414,2 @@ import {ParserOptions, Parser} from '../src/index.js'

describe('parser performance', () => {
let rows = [5000, 10000, 100000, 200000]
// let rows = [100000]
for (let i = 0; i < rows.length; i++) {
it(`reads ${rows[i]} rows`, function (done) {
this.timeout(0);
let opt : ParserOptions = {
hasHeader: true,
encoding: 'utf-8'
}
let sub = new Parser(opt)
let testItem = path.join(__dirname, 'spectrum', 'text', `mock_data_${rows[i]}.txt`)
console.time(`Read ${rows[i]} rows`)
sub.text2json(testItem)
.on('end', () => {
console.timeEnd(`Read ${rows[i]} rows`)
logMemoryUsage()
done()
})
})
}
})
function logTestData (expected : any, actual : any) : void {

@@ -441,0 +416,0 @@ console.log('Expected:\n', expected)

Sorry, the diff of this file is not supported yet

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