Socket
Book a DemoInstallSign in
Socket

@vojtatom/csvts

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@vojtatom/csvts

Tiny utility for parsing CSV files.

1.0.0
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

csv.ts 📄

Tiny utility for parsing CSV files.

  • dead simple, just a few lines of code
  • needs the entire CSV in memory
  • no dependencies
  • written in TypeScript
npm i @vojtatom/csvts

Usage

import { stringify, parse } from 'csvts';

const data = [
    ['id', 'name', 'age', 'weight', 'married', 'children', 'timestamp'],
    ['1', '"Dan, John"', '30', '80.5', 'true', '2', '2021-01-01T00:00:00.000Z'],
    ['2', '"Jack"', '40', '90.5', 'false', '0', '2021-01-02T00:00:00.000Z'],
    ['3', 'Back, "Jim"', '50', '"100.5"', 'true', '3', '2021-01-03T00:00:00.000Z'],
];

const csvString = stringify(csvData);
const originalData = parse(csvString);

Keywords

tables

FAQs

Package last updated on 16 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.