0.1.2 • Published 6 years ago

qm-fs-touch v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

logo-qm

qm-fs-touch npm version Build Status code style: prettier

Simple module for creation files on disk. Use only in node.js above v.8 due to util.promisify usage.

Installation

$ npm i -S qm-fs-touch

Usage

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 test

License

MIT © qaraluch