biofriction-wp-theme/node_modules/rev-path
jorge-vitrubio a7910c81a8 moved to new repo 2021-10-26 14:18:09 +02:00
..
index.js moved to new repo 2021-10-26 14:18:09 +02:00
license moved to new repo 2021-10-26 14:18:09 +02:00
package.json moved to new repo 2021-10-26 14:18:09 +02:00
readme.md moved to new repo 2021-10-26 14:18:09 +02:00

readme.md

rev-path Build Status

Create a revved file path

Install

$ npm install rev-path

Usage

const revPath = require('rev-path');
const hash = 'bb9d8fe615'

const 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'
  • rev-file - Get the revved file path of a file

License

MIT © Sindre Sorhus