rev-path-dxb
v2.0.1
Published
Create a revved file path. I'm just modifying the example demo.css = > demo.css?V=5a6b8d
Downloads
19
Maintainers
Readme
rev-path-dxb
Create a revved file path
Install
$ npm install rev-path-dxb
Usage
const revPath = require('rev-path-dxb');
const hash = 'bb9d8fe615'
const path = revPath('src/unicorn.png', hash);
//=> 'src/unicorn.png?v=bb9d8fe615'
revPath('src/unicorn.png', Date.now());
//=> 'src/unicor.png?v=1432309925925'
// You can also revert an already hashed path
revPath.revert(path, hash);
//=> 'src/unicorn.png'