Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/weidemo/revm-path
Create a revved file path appending md5 hash string.
https://github.com/weidemo/revm-path
Last synced: about 5 hours ago
JSON representation
Create a revved file path appending md5 hash string.
- Host: GitHub
- URL: https://github.com/weidemo/revm-path
- Owner: WeideMo
- Created: 2017-03-22T07:12:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-22T07:36:06.000Z (over 7 years ago)
- Last Synced: 2024-04-26T10:05:00.859Z (7 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 10
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# revm-path
> Create a revved file path appending md5 hash string.
## Install
```
$ npm install --save revm-path
```## Usage
```js
var revPath = require('revm-path');
var hash = 'bb9d8fe615'var path = revPath('src/unicorn.png', hash);
//=> 'src/unicorn.png?bb9d8fe615'revPath('src/unicorn.png', Date.now());
//=> 'src/unicorn.png?1432309925925'// you can also revert an already hashed path
revPath.revert(path, hash);
//=> 'src/unicorn.png'
```