wl-rev-path

1.0.2 • Public • Published

rev-path Build Status

Create a revved file path

Install

$ npm install @stl/wl-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'

Related

  • rev-file - Get the revved file path of a file

License

MIT © Sindre Sorhus

Readme

Keywords

none

Package Sidebar

Install

npm i wl-rev-path

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

2.69 kB

Total Files

4

Last publish

Collaborators

  • slothman