anchor.diff:  layout: refill.jade
   ---
   
  -==== ファイル書き込み
  +== ファイル書き込み
   
   [source,javascript]
   ----
  
positive.code:   { id: 'lemon' } ]
  */
  ----
  
negative.code: ----
  
  
  == 1列読み込み
  
  .sample.txt
  [source,text]
  ----
  red
  blue
  green
  yellow
  ----
  
  [source,javascript]
  ----
  const fs = require('fs');
  const content = fs.readFileSync('sample.txt').toString();
  const colors = content.trim().split('\n');
  //=> [ 'red', 'blue', 'green', 'yellow' ]
  ----
  
  
  == CSV読み込み
  
  .sample.csv
  [source,text]
  ----
  fruit
  apple
  