1.0.1 • Published 9 years ago

timestamp-file v1.0.1

Weekly downloads
3
License
MIT
Repository
-
Last release
9 years ago

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
  })