JSPM

rev-path

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 61984
  • Score
    100M100P100Q147344F
  • License MIT

Create a revved file path

Package Exports

  • rev-path

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rev-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rev-path Build Status

Create a revved file path

Install

$ npm install --save rev-path

Usage

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

var 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'

License

MIT © Sindre Sorhus