ac-rev-path
v1.0.0
Published
> Create a [revved file path](http://blog.risingstack.com/automatic-cache-busting-for-your-css/)
Downloads
4
Readme
ac-rev-path
Create a revved file path
Install
$ npm install --save ac-rev-path
Usage
var revPath = require('ac-rev-path');
var hash = 'bb9d8fe615'
var path = revPath('src/unicorn.png', hash);
//=> 'src/unicorn-bb9d8fe615.png'
revPath('src/unicorn.png', Date.now());
//=> 'src/unicorn-1432309925925.png'
// you can also revert an already hashed path
revPath.revert(path, hash);
//=> 'src/unicorn.png'
License
MIT © Sindre Sorhus