timestamp-file
v1.0.1
Published
create a file prepended by a time stamp
Downloads
9
Readme
Timestamp-file
A simple tool that makes a file with a timestamp prepended to the name
API
create
Can be used in classic node callback style, or with promises
const timestampFile = require('timestamp-file')
timestampFile.create('new/file.js', (err, path) => {
if (err) {
// shrug
}
// otherwise file exists at provided path
})
timestampFile.create('another/location/thing.js')
.then((path) => {
// yay
}, (err) => {
// boo
})