uniqf

Make a file name unique by appending a cryptographic hash

npm install uniqf
3 downloads in the last week
13 downloads in the last month

uniqf

Make a file name unique by appending a cryptographic hash.

build status dependency status dev dependency status

Example

var uniqf = require('uniqf');

uniqf('test/files/hasselblad.jpg', function (err, name) {
  console.log(name);
});

Mehods

var uniqf = require('uniqf');

uniqf(file, cb (err, name) {})

Generate a new unique file name based on the given file.

uniqf(src, dest, cb (err, name) {})

Generate a new unique file name based on the hash of the given src and the filename of the given dest.

License

MIT

npm loves you