parsec-rev-path

1.0.1 • Public • Published

parsec-rev-path Build Status

Create a revved file path

Install

$ npm install --save parsec-rev-path

Usage

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

License

MIT © Yanghc

Package Sidebar

Install

npm i parsec-rev-path

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • hqwlkj