Socket
Socket
Sign inDemoInstall

csv-config

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

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
334
decreased by-1.76%
Maintainers
1
Weekly downloads
 
Created
Source

csv-config

A CSV config parser and serializer for node

logo

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

Package last updated on 15 Dec 2017

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

  • 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