New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

txt-file-to-json

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

txt-file-to-json - npm Package Compare versions

Comparing version 3.0.4 to 3.0.5

2

package.json
{
"name": "txt-file-to-json",
"version": "3.0.4",
"version": "3.0.5",
"description": "Reads a txt file having a table and returns an array of obects. In which each object consists of all headers as keys and there data as values.",

@@ -5,0 +5,0 @@ "main": "txt_to_json.js",

@@ -1,5 +0,5 @@

<img src="./resources/txt_to_json.png" align="right" width="200" height="150"/>
<p align="center">
<img src="./resources/txt_to_json.png" width="300" height="200"/>
</p>
<h1 align="center">txt-file-to-json</h1>
<div align="center">

@@ -24,3 +24,2 @@

Use `filePath` key to provide `TEXT data from file`.
```javascript

@@ -30,5 +29,5 @@ const txtToJson = require("txt-file-to-json");

```
<br>
Use `data` key to provide `TEXT data from variable or directly`.
```javascript

@@ -38,5 +37,5 @@ const txtToJSON = require("txt-file-to-json");

```
<br>
#### Sample input (txt data) :
```

@@ -50,3 +49,2 @@ FIRST_NAME LAST_NAME NUMBER EMAIL ADDRESS

#### Sample output (json data) :
```

@@ -77,5 +75,5 @@ [

```
<br>
Use `noOfRecords` key along with `filePath` or `data` key to get data of `specific number of rows`.
```javascript

@@ -85,5 +83,5 @@ const txtToJson = require("txt-file-to-json");

```
<br>
#### Sample output when `noOfRecords` is `1` (json data) :
```

@@ -100,5 +98,6 @@ [

```
<br>
# References
* To convert text and csv both to json. Try - "https://www.npmjs.com/package/data-to-json"
* To convert only csv data to json. Try - "https://www.npmjs.com/package/csv-file-to-json"
* To convert text and csv both to json. Try - https://www.npmjs.com/package/data-to-json
* To convert only csv data to json. Try - https://www.npmjs.com/package/csv-file-to-json
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