2.0.1 • Published 5 years ago

rev-path-dxb v2.0.1

Weekly downloads
21
License
MIT
Repository
github
Last release
5 years ago

rev-path-dxb Build Status

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'