0.1.2 • Published 8 years ago
qm-fs-touch v0.1.2

qm-fs-touch

Simple module for creation files on disk. Use only in node.js above v.8 due to
util.promisifyusage.
Installation
$ npm i -S qm-fs-touchUsage
import touch from "qm-fs-ifexists";
// default
const options = {
encoding: "utf8",
overwrite: false
};
touch("./someFile", "content of the file", options).then(result => {
console.log(result); // path to a created file
});Content of the file can be a: \ | \ | \ as stated in Node.js documentation.
Test
Tests are written with ava. Run by:
npm run testLicense
MIT © qaraluch