Socket
Socket
Sign inDemoInstall

csv12n

Package Overview
Dependencies
22
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    csv12n

convert a big csv file to many small ones


Version published
Maintainers
1
Install size
0.983 MB
Created

Readme

Source

csv12n

convert a big csv file to many small ones

Getting Started

npm i csv12n

Usage


const csv12n = require('csv12n')

const source = __dirname + '/source.csv'
const target = __dirname + '/csv/'

csv12n(source, target, {
    prefix: 'test',
    headerLines: 1,
    dataLines: 2,
    progress: console.log,
})

csv12n(source, target, {
    prefix: 'test',
    headerLines: 1,
    dataLines: 2,
    // progress: console.log,
    encoding: 'utf8',
})

 // => source content
 // a,b,c
 // 1,2,3
 // 4,5,ʤ
 // 7,8,9
 
 // => target content test-0.csv
 // a,b,c
 // 1,2,3
 // 4,5,ʤ
 
 // => target content test-1.csv
 // a,b,c
 // 7,8,9

Test

npm test

FAQs

Last updated on 13 Mar 2019

Did you know?

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

  • 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