revm-path

1.0.1 • Public • Published

revm-path

Create a revved file path appending md5 hash string.

Install

$ npm install --save revm-path

Usage

var revPath = require('revm-path');
var hash = 'bb9d8fe615'
 
var path = revPath('src/unicorn.png', hash);
//=> 'src/unicorn.png?bb9d8fe615'
 
revPath('src/unicorn.png', Date.now());
//=> 'src/unicorn.png?1432309925925'
 
// you can also revert an already hashed path
revPath.revert(path, hash);
//=> 'src/unicorn.png'

Package Sidebar

Install

npm i revm-path

Weekly Downloads

1

Version

1.0.1

License

none

Last publish

Collaborators

  • caomei