Socket
Socket
Sign inDemoInstall

csv-config

Package Overview
Dependencies
11
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    csv-config

A `CSV` config parser and serializer for node.


Version published
Weekly downloads
200
increased by1718.18%
Maintainers
1
Install size
490 kB
Created
Weekly downloads
 

Readme

Source

csv-config

A CSV config parser and serializer for node

version downloads node status

Installation

npm install csv-config

Usage

Reading Config Files at Current Working Directory cwd

const CsvConfig = require('csv-config');

let config = CsvConfig("CsvConfig",true);

//reading config values
let data01=config['conf-01'].data[0][0];
let data02=config['conf-02'].data[0][0];
let data03=config['conf-03'].data[0][0];

//updating
config['conf-01'].data[0][1] = 1;
config['conf-02'].data[0][1] = 2;
config['conf-03'].data[0][1] = 3;

//saving configs
config.save();

Reading Config Files at User Home Directory

const CsvConfig = require('csv-config');

let config = CsvConfig("CsvConfig");

//reading config values
let data01=config['conf-01'].data[0][0];
let data02=config['conf-02'].data[0][0];
let data03=config['conf-03'].data[0][0];

//updating
config['conf-01'].data[0][1] = 1;
config['conf-02'].data[0][1] = 2;
config['conf-03'].data[0][1] = 3;

//saving configs
config.save();

Test

mocha or npm test

check test folder and QUICKSTART.js for extra usage.

Keywords

FAQs

Last updated on 23 Jan 2018

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