Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cmk-checklist

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmk-checklist

Read/Write CSV files for Comiket catalog checklist

  • 0.91.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

cmk-checklist

CircleCI

コミケットカタログ向けチェックファイル(CSV形式)の読み込み・書き込み

installation

npm install cmk-checklist

Usage

read

const checklist = require('cmk-checklist');
const fs = require('fs');

// checklist.csvを読み込み
const file = fs.readFileSync('./checklist.csv');

checklist.read(file).then((result) => {
  console.log(result.header.eventName);
}).catch((error) => {
  console.log(error);
});

// Async/Await形式で読み込み
async function read() {
  const result = await checklist.read(file);
  console.log(result.header.eventName);
});

// Callbackを設定
checklist.read(file, (err, result) => {
  if (err) console.log(err);
  else console.log(result.header.eventName);
});

write

const checklist = require('cmk-checklist');
const fs = require('fs');

async function write() {
  // 既存のチェックリストを読み込み
  const file = fs.readFileSync('./checklist.csv');
  let chk = await checklist.read(file);

  // チェックリストを新規作成
  chk = new checklist.Checklist();
  // コミケ開催番号を指定して作成
  chk = new checklist.Checklist(91);

  // サークルを追加
  chk.circles.append({
    serialNumber: 129936,
    colorNumber: 1,
    pageNumber: 831,
    cutIndex: 21,
    week: '金',
    area: '西',
    block: 'れ',
    spaceNumber: 19,
    spaceNumberSub: 'a',
    genreCode: 112,
    circleName: 'apricot+',
    circleNameYomi: 'アプリコットプラス',
    penName: '蒼樹うめ',
  });

  // チェックリストを書き込み
  const output = await checklist.write(chk);
  fs.writeFileSync('./output.csv', new Buffer(output));
}

license

MIT

Author

spring-raining

Keywords

FAQs

Package last updated on 16 Dec 2016

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