1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1x 1x 1x 1x 1x | import smartread from './smart-read.js' import smartwrite from './smart-write.js' class Textfile { constructor(path, options) { Iif (!path) throw new Error('invalid path') this.read = (opts) => smartread(path, opts) this.write = (value, opts) => smartwrite(path, value, opts) } } Textfile.read = smartread Textfile.write = smartwrite export default Textfile |