Liu Song’s Projects


~/Projects/dujitang

git clone https://code.lsong.org/dujitang

Blob

ref
master
path
./index.js

const fs = require('fs');
const { promisify } = require('util');

const readFile = promisify(fs.readFile);

module.exports = () => Promise
  .resolve()
  .then(() => readFile('./data/dujitang.txt', 'utf8'))
  .then(content => content.split(/\n/g))